Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CAL-3943] Zoom integration doesn't follow the zoom app settings for auto-record #15474

Open
milospuac opened this issue Jun 18, 2024 · 6 comments · May be fixed by #15478 or #15489
Open

[CAL-3943] Zoom integration doesn't follow the zoom app settings for auto-record #15474

milospuac opened this issue Jun 18, 2024 · 6 comments · May be fixed by #15478 or #15489
Labels
🐛 bug Something isn't working calendar-apps area: calendar, google calendar, outlook, lark, microsoft 365, apple calendar
Milestone

Comments

@milospuac
Copy link
Contributor

Screenshot 2024-06-18 at 10.05.46.png

From SyncLinear.com | CAL-3943

@dosubot dosubot bot added calendar-apps area: calendar, google calendar, outlook, lark, microsoft 365, apple calendar 🐛 bug Something isn't working labels Jun 18, 2024
Copy link

dosubot bot commented Jun 18, 2024

To ensure that meetings scheduled via Cal.com follow the Zoom app settings for auto-recording, you need to modify the translateEvent function in the VideoApiAdapter to set the auto_recording setting according to your preference.

Here is the relevant part of the code with the modification:

const translateEvent = (event: CalendarEvent) => {
  const getRecurrence = ({
    recurringEvent,
    startTime,
    attendees,
  }: CalendarEvent): { recurrence: ZoomRecurrence; type: 8 } | undefined => {
    if (!recurringEvent) {
      return;
    }

    let recurrence: ZoomRecurrence;

    switch (recurringEvent.freq) {
      case Frequency.DAILY:
        recurrence = {
          type: 1,
        };
        break;
      case Frequency.WEEKLY:
        recurrence = {
          type: 2,
          weekly_days: dayjs(startTime).tz(attendees[0].timeZone).day() + 1,
        };
        break;
      case Frequency.MONTHLY:
        recurrence = {
          type: 3,
          monthly_day: dayjs(startTime).tz(attendees[0].timeZone).date(),
        };
        break;
      default:
        return;
    }

    recurrence.repeat_interval = recurringEvent.interval;
    if (recurringEvent.until) {
      recurrence.end_date_time = recurringEvent.until.toISOString();
    } else {
      recurrence.end_times = recurringEvent.count;
    }

    return {
      recurrence: {
        ...recurrence,
      },
      type: 8,
    };
  };

  const recurrence = getRecurrence(event);
  return {
    topic: event.title,
    type: 2,
    start_time: dayjs(event.startTime).utc().format(),
    duration: (new Date(event.endTime).getTime() - new Date(event.startTime).getTime()) / 60000,
    timezone: event.organizer.timeZone,
    agenda: event.description,
    settings: {
      host_video: true,
      participant_video: true,
      cn_meeting: false,
      in_meeting: false,
      join_before_host: true,
      mute_upon_entry: false,
      watermark: false,
      use_pmi: false,
      approval_type: 2,
      audio: "both",
      auto_recording: "cloud", // Change this to "local" or "cloud" as per your Zoom settings
      enforce_login: false,
      registrants_email_notification: true,
    },
    ...recurrence,
  };
};

By setting auto_recording to "cloud" or "local", you ensure that the meetings scheduled via Cal.com will follow the Zoom app settings for auto-recording [1].

To continue talking to Dosu, mention @dosu.

@vijayraghav-io
Copy link
Contributor

vijayraghav-io commented Jun 18, 2024

/attempt

@milospuac This issue can be assigned to me, i am working on this -

  • creating zoom api interface to fetch user settings ..users/me/settings
  • retrieve recording settings from above api call
  • call POST user/me/meetings with above setting

@sean-brydon
Copy link
Member

/attempt

@milospuac This issue can be assigned to me, i am working on this -

  • creating zoom api interface to fetch user settings ..users/me/settings
  • retrieve recording settings from above api call
  • call POST user/me/meetings with above setting

Hey bud - we don't assign issues but please feel free to work on it and submit a PR

@vijayraghav-io
Copy link
Contributor

sure @sean-brydon Thankyou!

@milospuac
Copy link
Contributor Author

@sgriff96-brydon I think it also doesn't follow the password settings set in zoom. Link generated through Cal.com booking doesn't respect the password settings for the meeting. Can you include it into this one as well?

@vijayraghav-io
Copy link
Contributor

@sean-brydon , this is generic implementation any future zoom user setting required can be easily updated.
#15489

@dosubot dosubot bot added this to the v4.4 milestone Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working calendar-apps area: calendar, google calendar, outlook, lark, microsoft 365, apple calendar
Projects
None yet
3 participants