diff --git a/src/Editor/Modals/ExportOptions/ExportOptions.jsx b/src/Editor/Modals/ExportOptions/ExportOptions.jsx index da137e6df..7d1e748c4 100644 --- a/src/Editor/Modals/ExportOptions/ExportOptions.jsx +++ b/src/Editor/Modals/ExportOptions/ExportOptions.jsx @@ -102,7 +102,6 @@ class ExportOptions extends Component { this.props.toggle(); } else if (type === 'IMAGE_SEQUENCE') { this.props.exportProjectAsImageSequence(args); - this.props.toggle(); } else if (type === 'AUDIO_TRACK') { this.props.exportProjectAsAudioTrack(args); this.props.toggle(); diff --git a/src/Editor/export/VideoExport.js b/src/Editor/export/VideoExport.js index 96a80ede6..91ca04388 100644 --- a/src/Editor/export/VideoExport.js +++ b/src/Editor/export/VideoExport.js @@ -13,9 +13,13 @@ class VideoExport { */ static renderVideo = async (args) => { setLogging(ENABLE_LOGGING); - let logger = ENABLE_LOGGING ? (({message}) => console.log(message)) : (()=>{}); const worker = createWorker({ - logger: logger, + logger: ({message}) => { + if(ENABLE_LOGGING) { + console.log(message); + } + VideoExport._parseProgressMessage(message, args); + }, }); args.worker = worker; @@ -174,6 +178,24 @@ class VideoExport { height: newHeight }; } + + static _parseProgressMessage (message, args) { + if(!message) return + if(!message.includes('pts_time:')) return; + + var time; + + time = message.split('pts_time'); + if(!time) return; + time = time[1]; + if(!time) return; + time = time.split('pos'); + if(!time) return; + time = time[0]; + if(!time) return; + + args.onProgress('Rendered ' + time + ' seconds', 85); + } } export default VideoExport;