Skip to content

Commit c9a9f70

Browse files
kart1kaPeerRichUdit-takkar
authored
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 <peeroke@gmail.com> Co-authored-by: Udit Takkar <53316345+Udit-takkar@users.noreply.github.com> Co-authored-by: Udit Takkar <udit222001@gmail.com>
1 parent c2d7054 commit c9a9f70

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

packages/app-store/dailyvideo/lib/VideoApiAdapter.ts

+10-2
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,9 @@ const DailyVideoApiAdapter = (): VideoApiAdapter => {
208208
async function createInstantMeeting(endTime: string) {
209209
// added a 1 hour buffer for room expiration
210210
const exp = Math.round(new Date(endTime).getTime() / 1000) + 60 * 60;
211+
const { scale_plan: scalePlan } = await getDailyAppKeys();
212+
213+
const isScalePlanTrue = scalePlan === "true";
211214

212215
const body = {
213216
privacy: "public",
@@ -217,9 +220,14 @@ const DailyVideoApiAdapter = (): VideoApiAdapter => {
217220
enable_screenshare: true,
218221
enable_chat: true,
219222
exp: exp,
220-
enable_recording: "cloud",
223+
enable_recording: isScalePlanTrue ? "cloud" : undefined,
221224
start_video_off: true,
222-
enable_transcription_storage: true,
225+
enable_transcription_storage: isScalePlanTrue,
226+
...(!!isScalePlanTrue && {
227+
permissions: {
228+
canAdmin: ["transcription"],
229+
},
230+
}),
223231
},
224232
};
225233

0 commit comments

Comments
 (0)