зеркало из https://github.com/mozilla/popcorn-js.git
50 строки
1.3 KiB
HTML
Executable File
50 строки
1.3 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<title>Popcorn Subtitle Plug-in Demo</title>
|
|
<script src="../../popcorn.js"></script>
|
|
<script src="popcorn.subtitle.js"></script>
|
|
<script>
|
|
document.addEventListener( "DOMContentLoaded", function() {
|
|
var p = Popcorn( "#video" )
|
|
.volume( 0 )
|
|
.play()
|
|
.subtitle({
|
|
start: 5,
|
|
end: 15,
|
|
text: "this is the first subtitle of 2011",
|
|
})
|
|
.subtitle({
|
|
start: 20,
|
|
end: 45,
|
|
text: "this is the second subtitle of 2011",
|
|
})
|
|
}, false);
|
|
</script>
|
|
</head>
|
|
<body>
|
|
<h1 id="qunit-header">Popcorn Subtitle Plug-in Demo</h1>
|
|
<p> A subtitle displaying 'this is the first subtitle of 2011' will appear at 5 seconds and disappear at 15 seconds.</p>
|
|
<p> A subtitle displaying 'this is the second subtitle of 2011' will appear at 20 seconds and disappear at 45 seconds.</p>
|
|
<div>
|
|
|
|
<video id="video"
|
|
controls height="480" width="854"
|
|
poster="../../test/poster.png">
|
|
|
|
<source id="mp4"
|
|
src="../../test/trailer.mp4"
|
|
type='video/mp4; codecs="avc1, mp4a"'>
|
|
|
|
<source id="ogv"
|
|
src="../../test/trailer.ogv"
|
|
type='video/ogg; codecs="theora, vorbis"'>
|
|
|
|
<p>Your user agent does not support the HTML5 Video element.</p>
|
|
|
|
</video>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|