Skip to content

Commit

Permalink
after code review
Browse files Browse the repository at this point in the history
  • Loading branch information
RoyBregman committed Dec 5, 2019
1 parent 7fc8297 commit 42ac3a5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/flash.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,8 @@ class Flash extends FakeEventTarget implements IEngine {
EventType.SEEKED,
EventType.ENDED,
EventType.VIDEO_TRACK_CHANGED,
EventType.AUDIO_TRACK_CHANGED
EventType.AUDIO_TRACK_CHANGED,
EventType.DURATION_CHANGE
];
events.forEach(eventName => {
this._eventManager.listen(this._api, eventName, (event: FakeEvent) => this.dispatchEvent(event));
Expand Down
5 changes: 4 additions & 1 deletion src/flashhls-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@ class FlashHLSAdapter extends FakeEventTarget {
},
position: (timemetrics: Object) => {
this.paused = false;
this.duration = timemetrics.duration;
if (this.duration != timemetrics.duration) {
this.duration = timemetrics.duration;
this._trigger(EventType.DURATION_CHANGE);
}
this.buffer = timemetrics.buffer;
this.watched = timemetrics.watched;
if (this.currentTime != timemetrics.position || this.ended) {
Expand Down

0 comments on commit 42ac3a5

Please sign in to comment.