1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-19 10:54:16 +02:00

Merge branch 'master' of github.com:zencoder/video-js

This commit is contained in:
Steve Heffernan 2011-12-21 18:16:12 -08:00
commit 16f6c229f3
4 changed files with 12 additions and 3 deletions

View File

@ -2,6 +2,9 @@
# Combines Source Files. In terminal, sh build.sh # Combines Source Files. In terminal, sh build.sh
# It will put a new video.js file under dist/ # It will put a new video.js file under dist/
# Create dist directory if it doesn't already exist
mkdir -p dist
# FILES=../src/* # FILES=../src/*
# for f in $FILES # for f in $FILES
# do # do
@ -38,4 +41,4 @@ cp flash/video-js.swf dist/video-js.swf
cp build/files/README.md dist/README.md cp build/files/README.md dist/README.md
cp build/files/demo.html dist/demo.html cp build/files/demo.html dist/demo.html
cp LGPLv3-LICENSE.txt dist/LGPLv3-LICENSE.txt cp LGPLv3-LICENSE.txt dist/LGPLv3-LICENSE.txt

1
src/controls.js vendored
View File

@ -167,6 +167,7 @@ _V_.BigPlayButton = _V_.Button.extend({
}, },
onClick: function(){ onClick: function(){
this.player.currentTime(0);
this.player.play(); this.player.play();
} }
}); });

View File

@ -107,7 +107,12 @@ _V_.Player = _V_.Component.extend({
// Cache for video property values. // Cache for video property values.
values: {}, values: {},
destroy: function(){}, destroy: function(){
// Ensure that tracking progress and time progress will stop and plater deleted
this.stopTrackingProgress();
this.stopTrackingCurrentTime();
delete _V_.players[this.id]
},
createElement: function(type, options){ createElement: function(type, options){

View File

@ -88,7 +88,7 @@ _V_.Track.prototype = {
// Meaning the user is scrubbing in reverse or rewinding // Meaning the user is scrubbing in reverse or rewinding
reverse = (this.cues[this.lastCueIndex].startTime > time), reverse = (this.cues[this.lastCueIndex].startTime > time),
// If reverse, step back 1 becase we know it's not the lastCue // If reverse, step back 1 becase we know it's not the lastCue
i = this.lastCueIndex - (reverse) ? 1 : 0; i = this.lastCueIndex - (reverse ? 1 : 0);
while (true) { // Loop until broken while (true) { // Loop until broken
if (reverse) { // Looping in reverse if (reverse) { // Looping in reverse
// Stop if no more, or this cue ends before the current time (no earlier cues should apply) // Stop if no more, or this cue ends before the current time (no earlier cues should apply)