From c9a9f708019971df5a2b104fbec2a181cc2db04b Mon Sep 17 00:00:00 2001 From: Kartik Saini <41051387+kart1ka@users.noreply.github.com> Date: Fri, 21 Jun 2024 20:15:17 +0530 Subject: [PATCH] fix: create instant meeting error if DAILY_SCALE_PLAN is false (#15508) * fix: create instant meeting error due to enable_recording * fix: check scale plan --------- Co-authored-by: Peer Richelsen Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Udit Takkar --- packages/app-store/dailyvideo/lib/VideoApiAdapter.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/packages/app-store/dailyvideo/lib/VideoApiAdapter.ts b/packages/app-store/dailyvideo/lib/VideoApiAdapter.ts index 3910706a72..4442727595 100644 --- a/packages/app-store/dailyvideo/lib/VideoApiAdapter.ts +++ b/packages/app-store/dailyvideo/lib/VideoApiAdapter.ts @@ -208,6 +208,9 @@ const DailyVideoApiAdapter = (): VideoApiAdapter => { async function createInstantMeeting(endTime: string) { // added a 1 hour buffer for room expiration const exp = Math.round(new Date(endTime).getTime() / 1000) + 60 * 60; + const { scale_plan: scalePlan } = await getDailyAppKeys(); + + const isScalePlanTrue = scalePlan === "true"; const body = { privacy: "public", @@ -217,9 +220,14 @@ const DailyVideoApiAdapter = (): VideoApiAdapter => { enable_screenshare: true, enable_chat: true, exp: exp, - enable_recording: "cloud", + enable_recording: isScalePlanTrue ? "cloud" : undefined, start_video_off: true, - enable_transcription_storage: true, + enable_transcription_storage: isScalePlanTrue, + ...(!!isScalePlanTrue && { + permissions: { + canAdmin: ["transcription"], + }, + }), }, };