Skip to content

Commit f7081a2

Browse files
committed
Focus window before stopping recording
1 parent 7cf3f94 commit f7081a2

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

apps/web/app/(org)/dashboard/caps/components/web-recorder-dialog/useWebRecorder.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -997,9 +997,8 @@ export const useWebRecorder = ({
997997
recorder.onerror = onRecorderError;
998998

999999
const handleVideoEnded = () => {
1000-
stopRecordingRef.current?.().catch(() => {
1001-
/* ignore */
1002-
});
1000+
window.focus();
1001+
stopRecordingRef.current?.().catch(() => {});
10031002
};
10041003

10051004
firstTrack?.addEventListener("ended", handleVideoEnded, { once: true });

0 commit comments

Comments
 (0)