Ver Fonte

Editor: Revoke old video ObjectURLs

Mr.doob há 4 anos atrás
pai
commit
9ea6a221c4
1 ficheiros alterados com 6 adições e 2 exclusões
  1. 6 2
      editor/js/Sidebar.Project.Video.js

+ 6 - 2
editor/js/Sidebar.Project.Video.js

@@ -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...
-
 	}
 
 	//