-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: media source object URL revocation (#5214)
`createMediaSource()` sets `this.url_` for later revocation when the media source opens. However, `createMediaSource()` is called before the `url_` property is declared and initialised in the constructor. As result, `this.url_` actually get declared an initialised with the object URL in `createMediaSource()` and is later overwritten with an empty string in the constructor. This compromises the revocation logic as we end up always passing an empty string to `URL.revokeObjectURL()`. To fix this, we make sure `this.url_` is declared and assigned default value in the constructor before any other class methods are called.
- Loading branch information
Showing
2 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters