Skip to content

Commit 6a43ad5

Browse files
committed
Merge branch 'main' of github.com:CS3219-AY2425S1/cs3219-ay2425s1-project-g15
2 parents 6271b51 + 9e34ba6 commit 6a43ad5

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

frontend/src/app/collaboration/components/editor.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ function Collaboration({ room, language, code, setLanguage }: Readonly<Props>) {
134134
editor: { onDidChangeCursorPosition: (arg0: (e: any) => void) => void },
135135
monaco: any
136136
) {
137+
monaco.editor.setTheme("vs-dark");
138+
137139
editorRef.current = editor;
138140

139141
if (providerRef.current && docRef.current) {

frontend/src/app/collaboration/components/video.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const VideoCall = ({ provider }: VideoCallProps) => {
4242
urls: "turn:global.relay.metered.ca:80?transport=tcp",
4343
username: "2b012e1176eda910d0c8a755",
4444
credential: "6KjvgYahJZ21gdAp",
45-
}
45+
},
4646
],
4747
});
4848

@@ -90,7 +90,7 @@ const VideoCall = ({ provider }: VideoCallProps) => {
9090
urls: "turn:global.relay.metered.ca:80?transport=tcp",
9191
username: "2b012e1176eda910d0c8a755",
9292
credential: "6KjvgYahJZ21gdAp",
93-
}
93+
},
9494
],
9595
});
9696

@@ -227,13 +227,18 @@ const VideoCall = ({ provider }: VideoCallProps) => {
227227
removed.forEach((clientId) => {
228228
console.log("Client disconnected:", clientId);
229229
if (remoteVideoRef.current) {
230+
console.log("remote video exists");
230231
if (clientId !== provider.awareness.clientID) {
231232
remoteVideoRef.current.srcObject = null;
232233
remoteStreamRef.current = null;
233234
setRemoteVideoSourceObject(false);
234235
iceCandidatesQueue.current = [];
235236
startPC();
236-
if (videoStart) startCall();
237+
console.log(`Video start ${videoStart}`);
238+
if (videoStart) {
239+
console.log("restarting call");
240+
startCall();
241+
}
237242
} else {
238243
setVideoStart(false);
239244
}

0 commit comments

Comments
 (0)