diff --git a/.env.example b/.env.example index 418388c3..42c804a8 100644 --- a/.env.example +++ b/.env.example @@ -34,6 +34,7 @@ ZOOM_CLIENT_SECRET= #Used for the Daily integration DAILY_API_KEY= +DAILY_SCALE_PLAN='' # E-mail settings diff --git a/README.md b/README.md index 49b3aeac..5cc0c7f6 100644 --- a/README.md +++ b/README.md @@ -293,6 +293,7 @@ Contributions are what make the open source community such an amazing place to b 2. From within your dashboard, go to the [developers](https://dashboard.daily.co/developers) tab. 3. Copy your API key. 4. Now paste the API key to your .env file into the `DAILY_API_KEY` field in your .env file. + 5. If you have a [Daily Scale Plan](https://www.daily.co/pricing) can also enable the ability to record Daily video meetings. To do so, set the `DAILY_SCALE_PLAN` environment variable to `'true'` diff --git a/lib/integrations/Daily/DailyVideoApiAdapter.ts b/lib/integrations/Daily/DailyVideoApiAdapter.ts index dd4c11af..84515bd8 100644 --- a/lib/integrations/Daily/DailyVideoApiAdapter.ts +++ b/lib/integrations/Daily/DailyVideoApiAdapter.ts @@ -97,6 +97,23 @@ const DailyVideoApiAdapter = (credential: Credential): VideoApiAdapter => { // added a 1 hour buffer for room expiration and room entry const exp = Math.round(new Date(event.endTime).getTime() / 1000) + 60 * 60; const nbf = Math.round(new Date(event.startTime).getTime() / 1000) - 60 * 60; + const scalePlan = process.env.DAILY_SCALE_PLAN; + + if (scalePlan === "true") { + return { + privacy: "private", + properties: { + enable_new_call_ui: true, + enable_prejoin_ui: true, + enable_knocking: true, + enable_screenshare: true, + enable_chat: true, + exp: exp, + nbf: nbf, + enable_recording: "local", + }, + }; + } return { privacy: "private", properties: {