From d9fb9637bdbf6561043203e0e58a3a1c2a0313ab Mon Sep 17 00:00:00 2001 From: Jeff Emmett <46964190+Jeff-Emmett@users.noreply.github.com> Date: Sun, 8 Dec 2024 20:21:16 -0500 Subject: [PATCH] video bugs --- src/shapes/VideoChatShapeUtil.tsx | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/src/shapes/VideoChatShapeUtil.tsx b/src/shapes/VideoChatShapeUtil.tsx index 213bf7a..12a0329 100644 --- a/src/shapes/VideoChatShapeUtil.tsx +++ b/src/shapes/VideoChatShapeUtil.tsx @@ -94,8 +94,6 @@ export class VideoChatShape extends BaseBoxShapeUtil { } try { - const roomName = `canvas-room-${shape.id.replace(/[^A-Za-z0-9-_]/g, "-")}` - // Create room using Daily.co API directly const response = await fetch(`https://api.daily.co/v1/rooms`, { method: "POST", @@ -104,8 +102,6 @@ export class VideoChatShape extends BaseBoxShapeUtil { Authorization: `Bearer ${import.meta.env.VITE_DAILY_API_KEY}`, }, body: JSON.stringify({ - name: roomName, - privacy: "public", properties: { enable_chat: true, start_audio_off: true, @@ -126,21 +122,6 @@ export class VideoChatShape extends BaseBoxShapeUtil { if (!response.ok) { const errorData = (await response.json()) as DailyApiError - - // Handle the case where the room already exists - if (response.status === 409) { - const url = `https://${import.meta.env.VITE_DAILY_DOMAIN}/${roomName}` - this.editor.updateShape({ - id: shape.id, - type: "VideoChat", - props: { - ...shape.props, - roomUrl: url, - }, - }) - return - } - throw new Error( errorData.message || errorData.info || "Failed to create room", ) @@ -148,7 +129,6 @@ export class VideoChatShape extends BaseBoxShapeUtil { const { url } = (await response.json()) as { url: string } - // Update the shape with the room URL this.editor.updateShape({ id: shape.id, type: "VideoChat",