mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Update web-platform-tests to revision 4100d1d51b885185c50902397f7d203d89efc24c
This commit is contained in:
parent
fd174c54ef
commit
35b828da75
91 changed files with 1843 additions and 298 deletions
|
@ -10,12 +10,12 @@
|
|||
}
|
||||
.cue {
|
||||
position: absolute;
|
||||
top: 48px;
|
||||
top: 30px;
|
||||
left: 0px;
|
||||
font-family: sans-serif;
|
||||
background: green;
|
||||
color: rgba(255, 255, 255, 1);
|
||||
font-size: 12px;
|
||||
padding: 0px 2px;
|
||||
font-size: 7.5px;
|
||||
}
|
||||
</style>
|
||||
<div class="container">
|
||||
|
@ -26,4 +26,4 @@
|
|||
</video>
|
||||
<span class="cue">Bear is Coming!!!!!</span>
|
||||
</div>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -21,4 +21,4 @@ track.addCue(cue);
|
|||
track.mode = "showing";
|
||||
video.src = getVideoURI("/media/test");
|
||||
</script>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -15,9 +15,11 @@ var cue = new VTTCue(0, 3, "cue 2");
|
|||
cue.line = -2;
|
||||
track.addCue(cue);
|
||||
track.mode = "showing";
|
||||
|
||||
video.onloadeddata = function() {
|
||||
video.play();
|
||||
video.onplaying = function() {
|
||||
video.onplaying=null;
|
||||
video.pause();
|
||||
takeScreenshot();
|
||||
};
|
||||
</script>
|
||||
</html>
|
||||
</html>
|
||||
|
|
|
@ -11,20 +11,16 @@
|
|||
// Add two cues, where the first cue ends before the second.
|
||||
var video = document.querySelector("video");
|
||||
var track = video.addTextTrack("captions");
|
||||
track.addCue(new VTTCue(0, 1, "cue 1"));
|
||||
track.addCue(new VTTCue(0, 3, "cue 2"));
|
||||
let cue1 = new VTTCue(-1, 1, "cue 1");
|
||||
track.addCue(cue1);
|
||||
// As video's duration is 10s, it ensures that this cue would always be displayed.
|
||||
track.addCue(new VTTCue(0, 10, "cue 2"));
|
||||
track.mode = "showing";
|
||||
|
||||
video.onloadeddata = function() {
|
||||
// Double nesting of requestAnimationFrame to
|
||||
// make sure cue layout and paint happens.
|
||||
window.requestAnimationFrame(function() {
|
||||
window.requestAnimationFrame(function() {
|
||||
// Seek past the end of the first cue. The second cue should not move.
|
||||
video.currentTime = 2;
|
||||
video.onseeked = function() { takeScreenshot(); };
|
||||
});
|
||||
});
|
||||
video.play();
|
||||
cue1.onexit = () => {
|
||||
cue1.onexit = null;
|
||||
video.pause();
|
||||
takeScreenshot();
|
||||
};
|
||||
</script>
|
||||
</html>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue