mirror of
https://github.com/videojs/video.js.git
synced 2025-02-04 11:43:27 +02:00
Merge branch 'stable'
This commit is contained in:
commit
906de96632
@ -460,6 +460,7 @@ vjs.Player.prototype.onWaiting = function(){
|
|||||||
/**
|
/**
|
||||||
* A handler for events that signal that waiting has eneded
|
* A handler for events that signal that waiting has eneded
|
||||||
* which is not consistent between browsers. See #1351
|
* which is not consistent between browsers. See #1351
|
||||||
|
* @private
|
||||||
*/
|
*/
|
||||||
vjs.Player.prototype.onWaitEnd = function(){
|
vjs.Player.prototype.onWaitEnd = function(){
|
||||||
this.removeClass('vjs-waiting');
|
this.removeClass('vjs-waiting');
|
||||||
@ -738,7 +739,14 @@ vjs.Player.prototype.duration = function(seconds){
|
|||||||
return this.cache_.duration || 0;
|
return this.cache_.duration || 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Calculates how much time is left. Not in spec, but useful.
|
/**
|
||||||
|
* Calculates how much time is left.
|
||||||
|
*
|
||||||
|
* var timeLeft = myPlayer.remainingTime();
|
||||||
|
*
|
||||||
|
* Not a native video element function, but useful
|
||||||
|
* @return {Number} The time remaining in seconds
|
||||||
|
*/
|
||||||
vjs.Player.prototype.remainingTime = function(){
|
vjs.Player.prototype.remainingTime = function(){
|
||||||
return this.duration() - this.currentTime();
|
return this.duration() - this.currentTime();
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user