Merge branch 'demo' of github.com:annasob/popcorn-js into demo

This commit is contained in:
Anna Sobiepanek 2010-06-19 14:50:43 -04:00
Родитель 9c98047469 41db37922f
Коммит 0fb0ddc73f
2 изменённых файлов: 38 добавлений и 0 удалений

35
README
Просмотреть файл

@ -0,0 +1,35 @@
V I D E O . J S - 0.0
a library to work with the HTML5 <video> tag
//////////////////////////////////////////////////////////////////////////////
License MIT (see included LICENSE)
Original Authors Center for Development of Open Technology @ Seneca College
Web Site http://wiki.mozilla.org/Video_API
Github Repo. http://github.com/annasob/video-js
Bug Tracking https://processing-js.lighthouseapp.com/projects/52212-videojs/overview
IMPORTANT! - NOTE FOR DEVELOPERS
Please read the guidelines before pushing your code to the repository. The
function(s) you are working on may already be finished and queued for push.
GUIDELINES
https://processing-js.lighthouseapp.com/projects/52212/project-workflow
IRC CHANNEL
Join the development team at irc://irc.mozilla.org/processing.js for more info
//////////////////////////////////////////////////////////////////////////////
PLATFORM AND BROWSER COMPATIBILITY
Video.js is explicitly developed for and actively tested on browsers that
support the HTML5 <Video> element.
Video.js aims for 100 percent compatibility across all supported browsers;
however, differences between individual video implementations may give
slightly different results.
//////////////////////////////////////////////////////////////////////////////

Просмотреть файл

@ -1,3 +1,4 @@
// fire when DOM is ready, jQuery shortcut for $(document).ready
$(function() {
$("video").each(function() {
if (lang=window.location.search.substring(1)) {
@ -20,6 +21,7 @@ $(function() {
});
var lt = 0;
// fires when ontimeupdate() runs from <video> tag
function update(vid) {
var has_sub=false,
t = vid.currentTime;
@ -64,6 +66,7 @@ function update(vid) {
lt = t;
}
// convert time format mm:ss to seconds integer
function to_secs(time) {
var t = time.split(":");
return parseInt(t[0]*60,10) + parseInt(t[1],10);