Scheduling infrastructure for absolutely everyone.
Enable Recording in Daily Video Calls (#1141)
Lola669b7798db01
diff --git a/.env.example b/.env.exampleindex 418388c30cf..42c804a84e4 100644--- a/.env.example+++ b/.env.example@@ -34,6 +34,7 @@ ZOOM_CLIENT_SECRET=#Used for the Daily integrationDAILY_API_KEY=+DAILY_SCALE_PLAN=''# E-mail settingsdiff --git a/README.md b/README.mdindex 49b3aeac79b..5cc0c7f6cf4 100644--- a/README.md+++ b/README.md@@ -293,6 +293,7 @@ Contributions are what make the open source community such an amazing place to b2. 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'`<!-- LICENSE -->diff --git a/lib/integrations/Daily/DailyVideoApiAdapter.ts b/lib/integrations/Daily/DailyVideoApiAdapter.tsindex dd4c11afa12..84515bd8cc8 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 entryconst 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: {