Comparar commits

..

1 Commits

Autor SHA1 Mensagem Data
brandonocasey 44ab9637f1 fix: duration change should not be throttled for duration display update 2017-10-20 17:17:35 -04:00
4 arquivos alterados com 11 adições e 14160 exclusões
-14150
Ver Arquivo
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+1 -1
Ver Arquivo
@@ -67,6 +67,7 @@ class PlayToggle extends Button {
* @listens Player#seeked
*/
handleSeeked(event) {
// remove the ended class
this.removeClass('vjs-ended');
if (this.player_.paused()) {
@@ -85,7 +86,6 @@ class PlayToggle extends Button {
* @listens Player#play
*/
handlePlay(event) {
this.removeClass('vjs-ended');
this.removeClass('vjs-paused');
this.addClass('vjs-playing');
// change the button text to "Pause"
@@ -23,14 +23,15 @@ class DurationDisplay extends TimeDisplay {
constructor(player, options) {
super(player, options);
this.on(player, [
'durationchange',
// we do not want to/need to throttle duration changes,
// as they should always display the changed duration as
// it has changed
this.on(player, 'durationchange', this.updateContent);
// Also listen for timeupdate (in the parent) and loadedmetadata because removing those
// listeners could have broken dependent applications/libraries. These
// can likely be removed for 7.0.
'loadedmetadata'
], this.throttledUpdateContent);
// Also listen for timeupdate (in the parent) and loadedmetadata because removing those
// listeners could have broken dependent applications/libraries. These
// can likely be removed for 7.0.
this.on(player, 'loadedmetadata', this.throttledUpdateContent);
}
/**
@@ -48,7 +48,7 @@ class TimeDisplay extends Component {
'aria-live': 'off'
}, Dom.createEl('span', {
className: 'vjs-control-text',
textContent: this.localize(this.contentText_)
textContent: this.localize(this.controlText_)
}));
this.updateTextNode_();
@@ -63,7 +63,7 @@ class TimeDisplay extends Component {
* @private
*/
updateTextNode_() {
if (this.textNode_) {
if (this.textNode_ && this.contentEl_ && this.contentEl_.contains(this.textNode_)) {
this.contentEl_.removeChild(this.textNode_);
}
this.textNode_ = document.createTextNode(this.formattedTime_ || '0:00');