Skip to content

Commit 905f5d8

Browse files
committed
change remote icon
1 parent e804d2a commit 905f5d8

File tree

2 files changed

+11
-21
lines changed

2 files changed

+11
-21
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,6 @@ const Question = ({
6060
const chatLogsListRef = useRef<HTMLDivElement | null>(null);
6161
const CHAT_CHUNK_SIZE = 10; // Number of chat logs to fetch at a time
6262

63-
console.log(question);
64-
6563
const packageMessage = (message: SingleChatLogApiResponse): ChatLog => {
6664
const userId = getUserId();
6765
return {

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

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import {
66
CiVideoOn,
77
CiVideoOff,
88
} from "react-icons/ci";
9+
import { RxSpeakerLoud, RxSpeakerOff } from "react-icons/rx";
10+
911
import { Button } from "@/components/ui/button";
1012
type VideoCallProps = {
1113
provider: WebrtcProvider;
@@ -175,7 +177,6 @@ const VideoCall = ({ provider }: VideoCallProps) => {
175177
};
176178

177179
const startCall = async () => {
178-
console.log("starting call");
179180
setVideoStart(true);
180181
console.log(peerConnectionRef.current);
181182
if (peerConnectionRef.current) {
@@ -205,11 +206,6 @@ const VideoCall = ({ provider }: VideoCallProps) => {
205206
}
206207
};
207208

208-
const callButton = async () => {
209-
console.log("button pressed");
210-
await startCall();
211-
};
212-
213209
useEffect(() => {
214210
const awarenessListener = ({
215211
added,
@@ -223,7 +219,6 @@ const VideoCall = ({ provider }: VideoCallProps) => {
223219
added.concat(updated).forEach((clientId) => {
224220
if (clientId !== provider.awareness.clientID) {
225221
const state = provider.awareness.getStates().get(clientId);
226-
console.log(state);
227222
if (state?.webrtc) {
228223
handleSignalingMessage(state.webrtc);
229224
}
@@ -233,16 +228,13 @@ const VideoCall = ({ provider }: VideoCallProps) => {
233228
removed.forEach((clientId) => {
234229
console.log("Client disconnected:", clientId);
235230
if (remoteVideoRef.current) {
236-
console.log("remote video exists");
237231
if (clientId !== provider.awareness.clientID) {
238232
remoteVideoRef.current.srcObject = null;
239233
remoteStreamRef.current = null;
240234
setRemoteVideoSourceObject(false);
241235
iceCandidatesQueue.current = [];
242236
startPC();
243-
console.log(`Video start ${videoStart}`);
244237
if (videoStart) {
245-
console.log("restarting call");
246238
startCall();
247239
}
248240
} else {
@@ -314,16 +306,16 @@ const VideoCall = ({ provider }: VideoCallProps) => {
314306
<div className="mt-1">
315307
<button onClick={toggleLocalMute}>
316308
{isLocalMuted ? (
317-
<CiMicrophoneOff className="text-lg" />
309+
<CiMicrophoneOff className="text-2xl text-red" />
318310
) : (
319-
<CiMicrophoneOn className="text-lg" />
311+
<CiMicrophoneOn className="text-2xl" />
320312
)}
321313
</button>
322314
<button onClick={toggleLocalVideo}>
323315
{isLocalVideoOn ? (
324-
<CiVideoOn className="text-lg" />
316+
<CiVideoOn className="text-2xl" />
325317
) : (
326-
<CiVideoOff className="text-lg" />
318+
<CiVideoOff className="text-2xl text-red" />
327319
)}
328320
</button>
329321
</div>
@@ -344,24 +336,24 @@ const VideoCall = ({ provider }: VideoCallProps) => {
344336
<div className="mt-1">
345337
<button onClick={toggleRemoteMute}>
346338
{isRemoteMuted ? (
347-
<CiMicrophoneOff className="text-lg" />
339+
<RxSpeakerOff className="text-2xl text-red" />
348340
) : (
349-
<CiMicrophoneOn className="text-lg" />
341+
<RxSpeakerLoud className="text-2xl" />
350342
)}
351343
</button>
352344
<button onClick={toggleRemoteVideo}>
353345
{isRemoteVideoOn ? (
354-
<CiVideoOn className="text-lg" />
346+
<CiVideoOn className="text-2xl" />
355347
) : (
356-
<CiVideoOff className="text-lg" />
348+
<CiVideoOff className="text-2xl text-red" />
357349
)}
358350
</button>
359351
</div>
360352
)}
361353
</div>
362354
</div>
363355
{!videoStart && (
364-
<Button onClick={callButton} className="self-end ml-4">
356+
<Button onClick={startCall} className="self-end ml-4">
365357
Start Video Call
366358
</Button>
367359
)}

0 commit comments

Comments
 (0)