Browse Source

Editor: Improved video progress bar.

Mr.doob 4 years ago
parent
commit
27def9d26a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      editor/js/Sidebar.Project.Video.js

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

@@ -77,7 +77,7 @@ function SidebarProjectVideo( editor ) {
 
 
 		ffmpeg.setProgress( ( { ratio } ) => {
 		ffmpeg.setProgress( ( { ratio } ) => {
 
 
-			progress.setValue( ratio );
+			progress.setValue( ( ratio * 0.5 ) + 0.5 );
 
 
 		} );
 		} );
 
 
@@ -95,7 +95,7 @@ function SidebarProjectVideo( editor ) {
 			ffmpeg.FS( 'writeFile', `tmp.${num}.png`, await fetchFile( canvas.toDataURL() ) );
 			ffmpeg.FS( 'writeFile', `tmp.${num}.png`, await fetchFile( canvas.toDataURL() ) );
 			currentTime += 1 / fps;
 			currentTime += 1 / fps;
 
 
-			progress.setValue( i / frames );
+			progress.setValue( ( i / frames ) * 0.5 );
 
 
 		}
 		}