blob: c688b9153806ed046c49dc9246eb83dcd4822735 [file] [log] [blame]
<!DOCTYPE html>
<script src="../media-file.js"></script>
<script>
var mediaFile = findMediaFile('video', '../content/test');
function addTrackWithRtlCueData(video, cueData) {
var track = video.addTextTrack('subtitles');
var cue = new VTTCue(0, 10, '\u05d0\u05d1\u05d2');
for (var prop in cueData)
cue[prop] = cueData[prop];
track.addCue(cue);
track.mode = 'showing';
}
</script>
<style>
video::cue {
font-size: 50px;
color: green;
background-color: green;
}
</style>
<video>
<script>
var video = document.currentScript.parentNode;
addTrackWithRtlCueData(video, { align: 'start', size: 50, line: 0 });
video.src = mediaFile;
</script>
</video>
<video>
<script>
var video = document.currentScript.parentNode;
addTrackWithRtlCueData(video, { align: 'center', size: 50, line: 0 });
video.src = mediaFile;
</script>
</video>
<video>
<script>
var video = document.currentScript.parentNode;
addTrackWithRtlCueData(video, { align: 'end', size: 50, line: 0 });
video.src = mediaFile;
</script>
</video>