Index: chrome/test/data/media/html/media_track.html |
diff --git a/chrome/test/data/media/html/media_track.html b/chrome/test/data/media/html/media_track.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..e516a2fa34399d329af952265c4a87e374031979 |
--- /dev/null |
+++ b/chrome/test/data/media/html/media_track.html |
@@ -0,0 +1,46 @@ |
+<!-- |
+This HTML file contains player a div which is used for track testing |
annacc
2011/06/13 18:51:37
"contains a div for a player..." ?
imasaki1
2011/06/13 23:43:09
Done.
|
+(chrome/test/functional/media_track.py). This file is modification of |
+http://www.annacavender.com/track/demo1/trackdemo.html. |
+ |
+The query string should contain the following information: |
+ tag (optional): HTML video/audio tag (default is video). |
+ media (required): media file name. |
+ t (optional): add the "t" parameter to disable the media cache. |
dennis_jeffrey
2011/06/13 22:51:49
"add the "t" parameter to disable the media cache.
imasaki1
2011/06/13 23:43:09
Done.
|
+ track (required): the name of the track file (inband). |
annacc
2011/06/13 18:51:37
should say 'out-of-band'
imasaki1
2011/06/13 23:43:09
Done.
|
+ |
+ Example: "media_track.html?tag=video&media=foo.webm&track=track.vtt" |
+--> |
+<html> |
+<body onload="getTrackInfo()"> |
+<div id='player_container'></div> |
+<textarea rows="50" cols="50" id="text"> Default text. |
+</textarea> |
+<script type='text/javascript' src='player.js'></script> |
+<script> |
+function getTrackInfo() { |
+ var tr = document.getElementById('track'); |
+ var ta = document.getElementById('text'); |
+ ta.value = "track src = " + tr.src + "\n"; |
+ ta.value += "track srclang = " + tr.srclang + "\n"; |
+ ta.value += "track kind = " + tr.kind + "\n"; |
+ ta.value += "track label = " + tr.label + "\n"; |
+ ta.value += "track default = " + tr.getAttribute('default') + "\n\n"; |
+ ta.value += "CUES: (" + tr.track.cues.length + ")\n"; |
+ for (i = 0; i < tr.track.cues.length; i++) { |
dennis_jeffrey
2011/06/13 22:51:49
nit: "var i = 0;"
imasaki1
2011/06/13 23:43:09
Done.
|
+ ta.value += tr.track.cues[i].id + ": "; |
+ ta.value += tr.track.cues[i].startTime + " --> " + tr.track.cues[i].endTime + "\n"; |
Nirnimesh
2011/06/13 22:07:37
nit: 80+ lines
imasaki1
2011/06/13 23:43:09
Done.
|
+ ta.value += tr.track.cues[i].getCueAsSource() + "\n"; |
+ } |
+ ta.value += "END\n"; |
+} |
+ |
+if (ok) { |
+ player.play(); |
annacc
2011/06/13 18:51:37
If you are only testing the attributes of <track>
imasaki1
2011/06/13 23:43:09
I want to play the video since it is used for perf
|
+} |
+</script> |
+</body> |
+ |
+ |
dennis_jeffrey
2011/06/13 22:51:49
nit: remove these two blank lines.
imasaki1
2011/06/13 23:43:09
Done.
|
+</html> |
+ |
dennis_jeffrey
2011/06/13 22:51:49
nit: remove this blank line.
imasaki1
2011/06/13 23:43:09
Done.
|