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

properly destroy HLS.JS and / or DASH.JS instances #254

Merged
merged 1 commit into from
Oct 20, 2017
Merged

properly destroy HLS.JS and / or DASH.JS instances #254

merged 1 commit into from
Oct 20, 2017

Conversation

bstst
Copy link
Contributor

@bstst bstst commented Oct 20, 2017

I noticed the hls.js instance is still downloading the m3u8 playlist after the player is destroyed, so I figured this should fix this. Also, this way we're properly clearing up memory leaks.

this.hls.destroy()
}
if (this.dash) {
this.dash.reset()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if this stuff should move to stop() instead? stop() is called when unmounting, and we are already doing hls.detachMedia() there too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry, didn't notice it there. That's what you get when in a hurry. It makes perfect sense, so I'll "fix the fix".

@cookpete cookpete merged commit 633aa39 into cookpete:master Oct 20, 2017
@cookpete
Copy link
Owner

Thanks! 👍

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 this pull request may close these issues.

2 participants