(calEvent: {
videoCallData?: { type?: string; url?: string };
additionalInformation?: AdditionalInformation;
location?: string | null;
uid?: string | null;
})
| 625 | }; |
| 626 | |
| 627 | export const getVideoCallUrlFromCalEvent = (calEvent: { |
| 628 | videoCallData?: { type?: string; url?: string }; |
| 629 | additionalInformation?: AdditionalInformation; |
| 630 | location?: string | null; |
| 631 | uid?: string | null; |
| 632 | }): string => { |
| 633 | if (calEvent.videoCallData) { |
| 634 | if (calEvent.videoCallData.type === "daily_video") { |
| 635 | return getPublicVideoCallUrl(calEvent.uid); |
| 636 | } |
| 637 | return calEvent.videoCallData.url ?? ""; |
| 638 | } |
| 639 | if (calEvent.additionalInformation?.hangoutLink) { |
| 640 | return calEvent.additionalInformation.hangoutLink; |
| 641 | } |
| 642 | if (calEvent.location?.startsWith("http")) { |
| 643 | return calEvent.location; |
| 644 | } |
| 645 | return ""; |
| 646 | }; |
| 647 | |
| 648 | export const getVideoCallPassword = (videoCallData?: VideoCallData): string => { |
| 649 | return isDailyVideoCall(videoCallData) ? "" : (videoCallData?.password ?? ""); |
no test coverage detected