Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Likely copy paste error in audio-stream-controller.ts #6773

Closed
dagalvao opened this issue Oct 15, 2024 · 1 comment · Fixed by #6778
Closed

Likely copy paste error in audio-stream-controller.ts #6773

dagalvao opened this issue Oct 15, 2024 · 1 comment · Fixed by #6778
Milestone

Comments

@dagalvao
Copy link

I think this line:

hls.on(Events.FRAG_LOADING, this.onFragLoading, this);

Should be:

hls.off(Events.FRAG_LOADING, this.onFragLoading, this); 
@robwalch
Copy link
Collaborator

Thank you @dagalvao. Fortunately the typo only made its way into dev and v1.6.0-beta.1. Since all listeners are removed from the Hls API instance on destroy, impact should be minimal.

I've fixed the typo with #6778. A great follow up would be to extend eventemitter3 so that we could remove all listeners for a particular context (this) so that we could rewrite all controller unregisterListeners methods to something simpler like:

private unregisterListeners() {
  const { hls } = this;
  if (!hls) {
    return;
  }
  hls.removeListenersForContext(this);
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants