jquery-srt-fork/index.html

93 lines
2.0 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="http://v2v.cc/~j/Ogg.js/Ogg.js"></script>
<script type="text/javascript">
cortado_location = "http://footage.stealthisfilm.com/static/cortado.video.jar";
</script>
<script type="text/javascript" src="jquery.srt.js"></script>
<script type="text/javascript">
$(document).ready(function() {
// $('.srt').srt();
});
</script>
<style>
body {
color: #000;
background-color: #eee;
font: 14px verdana, sans-serif;
margin-left: 16px;
}
h1 {
margin-bottom: 0;
}
h2 {
margin-top: 0;
margin-left: 68px;
}
#left {
width: 550px;
}
#example {
position: absolute;
top: 56px;
left: 550px;
}
code {
background-color: #eee;
width: 580px;
}
.srt {
position: absolute;
bottom: 50px;
left: 600px;
width: 400px;
font-size: 16px;
}
</style>
</head>
<body>
<div id="left">
<p>
<h2>jquery.srt.js</h2>
<p>
play srt subtitles next to your &lt;video> element
</p>
<p>
<b>Example:</b>
<pre><code>
&lt;script type="text/javascript" src="jquery.js">&lt;/script>
&lt;script type="text/javascript" src="jquery.srt.js">&lt;/script>
&lt;script type="text/javascript">
$(document).ready(function() {
$('.srt').srt();
});
&lt;/script>
&lt;video src="http://example.com/video.ogv" id="video" controls>
&lt;/video>
&lt;div class="srt"
data-video="video"
data-srt="http://example.com/video.srt" />
</code></pre>
'data-video' atribute is used to link to the related video,<br>
if no data-srt is provided, the contents of the div is parsed as srt.
</p>
<p>
<b>Download:</b> <a href="jquery.srt.js">jquery.srt.js</a>
</p>
</div>
<p>
<video src="http://footage.stealthisfilm.com/stream/Robert%20Darnton%20-%20Two%20Information%20Systems%20at%20War%2C%20in%2018th%20Century%20France.ogg" id="video" autplay controls></video>
</p>
<div class="srt" data-video="video" data-srt="sample.srt"> </div>
</div>
</body>
</html>