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>
This commit is contained in:
co-authored by
Peer Richelsen
Udit Takkar
Udit Takkar
parent
c2d7054ec4
commit
c9a9f70801
@@ -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"],
|
||||
},
|
||||
}),
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user