Skip to content

Commit

Permalink
fix: do not remove shaka event bindings on reset but in destroy (#189)
Browse files Browse the repository at this point in the history
currently, we remove shaka event binding on reset so we dont get shaka events after detach/attach
  • Loading branch information
yairans committed Mar 27, 2022
1 parent e02c629 commit 1378ba2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dash-adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -826,6 +826,7 @@ export default class DashAdapter extends BaseMediaSourceAdapter {
super.destroy().then(() => {
DashAdapter._logger.debug('destroy');
this._loadPromise = null;
this._adapterEventsBindings = {};
this._reset()
.then(resetResult => {
this._isDestroyInProgress = false;
Expand Down Expand Up @@ -872,7 +873,6 @@ export default class DashAdapter extends BaseMediaSourceAdapter {
this._eventManager.removeAll();
}
if (this._shaka) {
this._adapterEventsBindings = {};
return this._shaka.destroy();
}
return Promise.resolve();
Expand Down

0 comments on commit 1378ba2

Please sign in to comment.