зеркало из https://github.com/mozilla/popcorn-js.git
Merge branch 'demo' of github.com:annasob/popcorn-js into demo
This commit is contained in:
Коммит
0fb0ddc73f
35
README
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.
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
3
video.js
3
video.js
|
@ -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);
|
||||
|
|
Загрузка…
Ссылка в новой задаче