Skip to content

Commit

Permalink
@MattiasBuelens updated components to use durationchange only. closes #…
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiasBuelens authored and gkatsev committed Jul 18, 2016
1 parent e7ca49e commit e2bfe09
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -17,6 +17,7 @@ CHANGELOG
* @nickygerritsen removed unused tracks when changing sources. Fixes #3000 ([view](https://github.com/videojs/video.js/pull/3002))
* @vit-koumar updated Flash tech to return Infinity from duration instead of -1 ([view](https://github.com/videojs/video.js/pull/3128))
* @alex-phillips added ontextdata to Flash tech ([view](https://github.com/videojs/video.js/pull/2748))
* @MattiasBuelens updated components to use durationchange only ([view](https://github.com/videojs/video.js/pull/3349))

--------------------

Expand Down
8 changes: 1 addition & 7 deletions src/js/control-bar/time-controls/duration-display.js
Expand Up @@ -18,13 +18,7 @@ class DurationDisplay extends Component {
constructor(player, options){
super(player, options);

// this might need to be changed to 'durationchange' instead of 'timeupdate' eventually,
// however the durationchange event fires before this.player_.duration() is set,
// so the value cannot be written out using this method.
// Once the order of durationchange and this.player_.duration() being set is figured out,
// this can be updated.
this.on(player, 'timeupdate', this.updateContent);
this.on(player, 'loadedmetadata', this.updateContent);
this.on(player, 'durationchange', this.updateContent);
}

/**
Expand Down
1 change: 1 addition & 0 deletions src/js/control-bar/time-controls/remaining-time-display.js
Expand Up @@ -19,6 +19,7 @@ class RemainingTimeDisplay extends Component {
super(player, options);

this.on(player, 'timeupdate', this.updateContent);
this.on(player, 'durationchange', this.updateContent);
}

/**
Expand Down

0 comments on commit e2bfe09

Please sign in to comment.