show message when frame captured

pull/276/head
Mikael Finstad 6 years ago
parent 9e2f5caa22
commit b389061b41

@ -921,7 +921,8 @@ const App = memo(() => {
return;
}
try {
await captureFrame(customOutDir, filePath, videoRef.current, currentTimeRef.current, captureFormat);
const outPath = await captureFrame(customOutDir, filePath, videoRef.current, currentTimeRef.current, captureFormat);
toast.fire({ icon: 'success', title: `Screenshot captured to: ${outPath}` });
} catch (err) {
console.error(err);
errorToast('Failed to capture frame');

@ -26,5 +26,6 @@ export default async function captureFrame(customOutDir, filePath, video, curren
const outPath = getOutPath(customOutDir, filePath, `${time}.${ext}`);
await fs.writeFile(outPath, buf);
const offset = -video.duration + currentTime;
return transferTimestampsWithOffset(filePath, outPath, offset);
await transferTimestampsWithOffset(filePath, outPath, offset);
return outPath;
}

Loading…
Cancel
Save