Comparar commits
1 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 44ab9637f1 |
@@ -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');
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário