mirror of
https://github.com/videojs/video.js.git
synced 2025-02-08 12:05:47 +02:00
Revert "Added Support for custom video start time"
This reverts commit ab5f977d62b1aec9ab519918f8c43e000e0e8b19.
This commit is contained in:
parent
3865d44b0e
commit
bce339c405
12
src/js/controls.js
vendored
12
src/js/controls.js
vendored
@ -199,14 +199,8 @@ vjs.PlayToggle.prototype.buildCSSClass = function(){
|
||||
// OnClick - Toggle between play and pause
|
||||
vjs.PlayToggle.prototype.onClick = function(){
|
||||
if (this.player_.paused()) {
|
||||
if (this.player_.currentTime() === this.player_.duration() || this.player_.currentTime() === 0 ){
|
||||
if(this.options_['start-time']!== undefined){
|
||||
this.player_.currentTime(this.options_['start-time']);
|
||||
}
|
||||
}
|
||||
this.player_.play();
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
this.player_.pause();
|
||||
}
|
||||
};
|
||||
@ -278,7 +272,9 @@ vjs.BigPlayButton.prototype.createEl = function(){
|
||||
vjs.BigPlayButton.prototype.onClick = function(){
|
||||
// Go back to the beginning if big play button is showing at the end.
|
||||
// Have to check for current time otherwise it might throw a 'not ready' error.
|
||||
|
||||
if(this.player_.currentTime()) {
|
||||
this.player_.currentTime(0);
|
||||
}
|
||||
this.player_.play();
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user