Skip to content

Commit

Permalink
fix(FEC-12335): Side Panel Item gets refreshed in every 'change media' (
Browse files Browse the repository at this point in the history
  • Loading branch information
JonathanTGold committed Aug 25, 2022
1 parent 009dc52 commit 3e078eb
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -644,9 +644,10 @@ export default class Player extends FakeEventTarget {
/**
* Resets the necessary components before change media.
* @public
* @param {boolean} isChangeMedia - Whether or not this reset triggered due to change media
* @returns {void}
*/
reset(): void {
reset(isChangeMedia: boolean = false): void {
if (this._reset) return;
this.pause();
//make sure all services are reset before engine and engine attributes are reset
Expand All @@ -668,7 +669,7 @@ export default class Player extends FakeEventTarget {
}
this.showBlackCover();
this._reset = true;
this.dispatchEvent(new FakeEvent(CustomEventType.PLAYER_RESET));
this.dispatchEvent(new FakeEvent(CustomEventType.PLAYER_RESET, {isChangeMedia}));
this._eventManager.removeAll();
this._resizeWatcher.init(Utils.Dom.getElementById(this._playerId));
this._createReadyPromise();
Expand Down

0 comments on commit 3e078eb

Please sign in to comment.