-
Notifications
You must be signed in to change notification settings - Fork 424
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
fix: Use revokeObjectURL dispose for created MSE blob urls #849
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth a test, otherwise looks good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this something we can reasonably add a test to?
@@ -829,6 +831,11 @@ class HlsHandler extends Component { | |||
delete this.tech_.hls; | |||
} | |||
|
|||
if (this.mediaSourceUrl_ && window.URL.revokeObjectURL) { | |||
window.URL.revokeObjectURL(this.mediaSourceUrl_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alternatively, we could've gotten the blob url via this.tech_.src()
but I think this is fine as well.
Added a test. 🤞 for ie 11... |
7a5827e
to
daf4274
Compare
Prevents a memory leak that we have right now, caused by not revoking urls that we create.