| <!DOCTYPE html> |
| <html> |
| <head> |
| <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
| |
| <script src=../media-file.js></script> |
| <script src=../video-test.js></script> |
| <script src=../media-controls.js></script> |
| |
| <script> |
| |
| var cueDisplayElement; |
| |
| function testPosition() |
| { |
| if (!window.internals) { |
| consoleWrite("<br><b>** This test only works in DRT! **<" + "/b>"); |
| return; |
| } |
| |
| consoleWrite(""); |
| cueDisplayElement = textTrackDisplayElement(video, 'display', 0); |
| document.body.offsetTop; |
| testExpected("cueDisplayElement.offsetTop > (video.videoHeight * .70)", true); |
| endTest(); |
| } |
| |
| function loaded() |
| { |
| consoleWrite("The top of the text track container should be in the bottom 30% of the video element."); |
| |
| findMediaElement(); |
| video.src = findMediaFile('video', '../content/test'); |
| waitForEvent('canplaythrough', function () {setTimeout(testPosition, 100);}); |
| } |
| |
| setCaptionDisplayMode('Automatic'); |
| </script> |
| </head> |
| <body onload="loaded()"> |
| <video controls> |
| <track src="captions-webvtt/captions-snap-to-lines-not-set.vtt" kind="captions" > |
| <track src="captions-webvtt/simple-captions.vtt" kind="captions" > |
| <track src="captions-webvtt/sorted-dispatch.vtt" kind="captions" > |
| <track src="captions-webvtt/captions-fast.vtt" kind="captions" > |
| <track src="captions-webvtt/captions-html.vtt" kind="captions" > |
| <track src="captions-webvtt/captions.vtt" kind="captions" default> |
| </video> |
| </body> |
| </html> |