Skip to content

Commit

Permalink
FE: [fix] 부정행위 시작 시간 추가 #53
Browse files Browse the repository at this point in the history
  • Loading branch information
hyeona01 committed Dec 8, 2024
1 parent 0232ace commit cb0d4c2
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/frontend/eyesee-user/src/app/exam-room/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,12 @@ const RealTimeVideoPage = () => {

const uploadVideo = async (videoFile: File) => {
try {
if (!userId || !cheatingStartTimeRef.current) {
console.error("사용자 ID 또는 부정행위 시작 시간이 없습니다.");
if (!userId) {
console.error("사용자 ID가 없습니다.");
return;
}
if (!cheatingStartTimeRef.current) {
console.error("부정행위 시작 시간이 없습니다.");
return;
}

Expand All @@ -166,6 +170,7 @@ const RealTimeVideoPage = () => {

const startRecording = (stream: MediaStream) => {
recordedChunksRef.current = []; // 기존 청크 초기화
cheatingStartTimeRef.current = new Date().toISOString();

mediaRecorderRef.current = new MediaRecorder(stream, {
mimeType: "video/webm",
Expand Down

0 comments on commit cb0d4c2

Please sign in to comment.