Skip to content

Commit e804d2a

Browse files
committed
why
1 parent b229070 commit e804d2a

File tree

1 file changed

+7
-1
lines changed
  • frontend/src/app/collaboration/components

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ const VideoCall = ({ provider }: VideoCallProps) => {
175175
};
176176

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

208+
const callButton = async () => {
209+
console.log("button pressed");
210+
await startCall();
211+
};
212+
207213
useEffect(() => {
208214
const awarenessListener = ({
209215
added,
@@ -355,7 +361,7 @@ const VideoCall = ({ provider }: VideoCallProps) => {
355361
</div>
356362
</div>
357363
{!videoStart && (
358-
<Button onClick={startCall} className="self-end ml-4">
364+
<Button onClick={callButton} className="self-end ml-4">
359365
Start Video Call
360366
</Button>
361367
)}

0 commit comments

Comments
 (0)