Skip to content

Commit ba37234

Browse files
fix: 비디오 미리보기 창 꺼질 경우 미리보기 스트림 정지
1 parent aeb0429 commit ba37234

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

frontend/src/components/session/MediaPreviewModal.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,11 @@ const MediaPreviewModal = ({
118118
className={"text-semibold-r mt-4 flex w-full justify-center gap-4"}
119119
>
120120
<button
121-
onClick={onReject}
121+
onClick={() => {
122+
onReject();
123+
setReady(false);
124+
preview?.getTracks().forEach((track) => track.stop());
125+
}}
122126
className={
123127
"rounded-custom-m px-16 py-4 bg-gray-50 hover:bg-gray-100"
124128
}

0 commit comments

Comments
 (0)