mirror of
https://github.com/videojs/video.js.git
synced 2025-02-14 12:20:48 +02:00
Merge branch 'patch-1' of git://github.com/MrAvenger/video.js into MrAvenger-patch-1
This commit is contained in:
commit
24125bbb63
@ -164,7 +164,12 @@ vjs.PlayProgressBar.prototype.createEl = function(){
|
||||
* @param {Object=} options
|
||||
* @constructor
|
||||
*/
|
||||
vjs.SeekHandle = vjs.SliderHandle.extend();
|
||||
vjs.SeekHandle = vjs.SliderHandle.extend({
|
||||
init: function(player, options) {
|
||||
vjs.SliderHandle.call(this, player, options);
|
||||
player.on('timeupdate', vjs.bind(this, this.updateContent));
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* The default value for the handle content, which may be read by screen readers
|
||||
@ -175,8 +180,15 @@ vjs.SeekHandle = vjs.SliderHandle.extend();
|
||||
vjs.SeekHandle.prototype.defaultValue = '00:00';
|
||||
|
||||
/** @inheritDoc */
|
||||
vjs.SeekHandle.prototype.createEl = function(){
|
||||
return vjs.SliderHandle.prototype.createEl.call(this, 'div', {
|
||||
className: 'vjs-seek-handle'
|
||||
});
|
||||
vjs.SeekHandle.prototype.createEl = function() {
|
||||
return this.content = vjs.SliderHandle.prototype.createEl.call(this, 'div', {
|
||||
className: 'vjs-seek-handle'
|
||||
});
|
||||
};
|
||||
|
||||
vjs.SeekHandle.prototype.updateContent = function() {
|
||||
|
||||
// Allows for smooth scrubbing, when player can't keep up.
|
||||
var time = (this.player_.scrubbing) ? this.player_.getCache().currentTime : this.player_.currentTime();
|
||||
this.content.innerHTML = '<span class="vjs-control-text">' + vjs.formatTime(time, this.player_.duration()) + '</span>';
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user