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 <[email protected]> Co-authored-by: Udit Takkar <[email protected]> Co-authored-by: Udit Takkar <[email protected]>
This commit is contained in:
1 file changed
+10
-2
@@ -208,6 +208,9 @@ const DailyVideoApiAdapter = (): VideoApiAdapter => {
|
|||||||
async function createInstantMeeting(endTime: string) {
|
async function createInstantMeeting(endTime: string) {
|
||||||
// added a 1 hour buffer for room expiration
|
// added a 1 hour buffer for room expiration
|
||||||
const exp = Math.round(new Date(endTime).getTime() / 1000) + 60 * 60;
|
const exp = Math.round(new Date(endTime).getTime() / 1000) + 60 * 60;
|
||||||
|
const { scale_plan: scalePlan } = await getDailyAppKeys();
|
||||||
|
|
||||||
|
const isScalePlanTrue = scalePlan === "true";
|
||||||
|
|
||||||
const body = {
|
const body = {
|
||||||
privacy: "public",
|
privacy: "public",
|
||||||
@@ -217,9 +220,14 @@ const DailyVideoApiAdapter = (): VideoApiAdapter => {
|
|||||||
enable_screenshare: true,
|
enable_screenshare: true,
|
||||||
enable_chat: true,
|
enable_chat: true,
|
||||||
exp: exp,
|
exp: exp,
|
||||||
enable_recording: "cloud",
|
enable_recording: isScalePlanTrue ? "cloud" : undefined,
|
||||||
start_video_off: true,
|
start_video_off: true,
|
||||||
enable_transcription_storage: true,
|
enable_transcription_storage: isScalePlanTrue,
|
||||||
|
...(!!isScalePlanTrue && {
|
||||||
|
permissions: {
|
||||||
|
canAdmin: ["transcription"],
|
||||||
|
},
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user