Skip to content

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

Merged
cookpete merged 1 commit into
cookpete:masterfrom
bstst:master
Oct 20, 2017
Merged

properly destroy HLS.JS and / or DASH.JS instances#254
cookpete merged 1 commit into
cookpete:masterfrom
bstst:master

Conversation

@bstst

@bstst bstst commented Oct 20, 2017

Copy link
Copy Markdown
Contributor

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.

Comment thread src/players/FilePlayer.js Outdated
this.hls.destroy()
}
if (this.dash) {
this.dash.reset()

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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