+ {!isExporting && (
+ <>
+
+
+
+ Format
+
+
+ {
+ if (isExportFormat(value)) {
+ setFormat(value);
+ }
+ }}
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Quality
+
+
+ {
+ if (isExportQuality(value)) {
+ setQuality(value);
+ }
+ }}
+ >
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Audio
+
+
+
+
+ setShouldIncludeAudio(!!checked)
+ }
+ />
+
+
+
+
+
+
+
+
+
+ >
+ )}
+
+ {isExporting && (() => {
+ const { totalFrames = 0, currentFrame = 0, elapsedMs = 0 } = exportState;
+ const etaMs = progress > 0 && progress < 1
+ ? Math.round((elapsedMs / progress) - elapsedMs)
+ : 0;
+
+ return (
+
+
+
+
+ {Math.round(progress * 100)}%
+
+
100%
+
+
+
+
+
+ {totalFrames > 0 && (
+
+ Frame {currentFrame.toLocaleString()} / {totalFrames.toLocaleString()}
+
+ )}
+
+ Elapsed {formatDuration(elapsedMs)}
+ {etaMs > 0 && ~{formatDuration(etaMs)} remaining}
+
+
+
+
+ Cancel
+
+ }
+ />
+
+ );
+ })()}
+
+ >
+ )}
+