1
0
mirror of https://github.com/videojs/video.js.git synced 2025-01-25 11:13:52 +02:00

Merge branch 'stable'

This commit is contained in:
Steve Heffernan 2014-10-28 10:35:56 -07:00
commit 906de96632

View File

@ -460,6 +460,7 @@ vjs.Player.prototype.onWaiting = function(){
/**
* A handler for events that signal that waiting has eneded
* which is not consistent between browsers. See #1351
* @private
*/
vjs.Player.prototype.onWaitEnd = function(){
this.removeClass('vjs-waiting');
@ -738,7 +739,14 @@ vjs.Player.prototype.duration = function(seconds){
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(){
return this.duration() - this.currentTime();
};