Skip to content

Commit

Permalink
Editor: Revoke old video ObjectURLs
Browse files Browse the repository at this point in the history
  • Loading branch information
mrdoob committed Feb 16, 2021
1 parent 1d31c72 commit 9ea6a22
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions editor/js/Sidebar.Project.Video.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,16 @@ function SidebarProjectVideo( editor ) {

function save( blob, filename ) {

if ( link.href ) {

URL.revokeObjectURL( link.href );

}

link.href = URL.createObjectURL( blob );
link.download = filename;
link.dispatchEvent( new MouseEvent( 'click' ) );

// URL.revokeObjectURL( url ); breaks Firefox...

}

//
Expand Down

0 comments on commit 9ea6a22

Please sign in to comment.