| <!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> |
| </head> |
| <body> |
| <p>Tests the load event on HTMLTrackElement and LOADED readyState on TextTrack when src is set from JavaScript.</p> |
| <video> |
| <track id="testTrackEmpty"> |
| </video> |
| <script> |
| |
| function trackLoaded() |
| { |
| consoleWrite("EVENT(load)"); |
| testExpected("track.readyState", HTMLTrackElement.LOADED); |
| endTest(); |
| } |
| |
| track = document.getElementById('testTrackEmpty'); |
| testExpected("track.readyState", HTMLTrackElement.NONE); |
| track.addEventListener("load", function () { trackLoaded(); }, true); |
| track.src = "captions-webvtt/tc004-webvtt-file.vtt"; |
| track.track.mode = "hidden"; |
| |
| </script> |
| </body> |
| </html> |