diff --git a/src/App.jsx b/src/App.jsx index 80a47517..519e1e5c 100644 --- a/src/App.jsx +++ b/src/App.jsx @@ -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'); diff --git a/src/capture-frame.js b/src/capture-frame.js index 1d6e77a1..0e3a9c40 100644 --- a/src/capture-frame.js +++ b/src/capture-frame.js @@ -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; }