[MM-55503] Update Calls Desktop API (#2937)

* Update Calls Desktop API

* Update tests

* Handle Calls links internally

---------

Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
This commit is contained in:
Claudio Costa
2024-01-24 09:54:19 -06:00
committed by GitHub
parent 37829f11d2
commit 1613eb17bc
7 changed files with 146 additions and 72 deletions

View File

@@ -38,30 +38,36 @@ export type DesktopAPI = {
onBrowserHistoryPush: (listener: (pathName: string) => void) => () => void;
sendBrowserHistoryPush: (path: string) => void;
// Calls widget
openLinkFromCallsWidget: (url: string) => void;
openScreenShareModal: () => void;
onScreenShared: (listener: (sourceID: string, withAudio: boolean) => void) => () => void;
callsWidgetConnected: (callID: string, sessionID: string) => void;
onJoinCallRequest: (listener: (callID: string) => void) => () => void;
resizeCallsWidget: (width: number, height: number) => void;
focusPopout: () => void;
leaveCall: () => void;
sendCallsError: (err: string, callID?: string, errMsg?: string) => void;
// Calls plugin
getDesktopSources: (opts: DesktopSourcesOptions) => Promise<DesktopCaptureSource[]>;
onOpenScreenShareModal: (listener: () => void) => () => void;
shareScreen: (sourceID: string, withAudi: boolean) => void;
// Calls
joinCall: (opts: {
callID: string;
title: string;
rootID: string;
channelURL: string;
}) => Promise<{callID: string; sessionID: string}>;
sendJoinCallRequest: (callId: string) => void;
leaveCall: () => void;
callsWidgetConnected: (callID: string, sessionID: string) => void;
resizeCallsWidget: (width: number, height: number) => void;
sendCallsError: (err: string, callID?: string, errMsg?: string) => void;
onCallsError: (listener: (err: string, callID?: string, errMsg?: string) => void) => () => void;
getDesktopSources: (opts: DesktopSourcesOptions) => Promise<DesktopCaptureSource[]>;
openScreenShareModal: () => void;
onOpenScreenShareModal: (listener: () => void) => () => void;
shareScreen: (sourceID: string, withAudio: boolean) => void;
onScreenShared: (listener: (sourceID: string, withAudio: boolean) => void) => () => void;
sendJoinCallRequest: (callId: string) => void;
onJoinCallRequest: (listener: (callID: string) => void) => () => void;
openLinkFromCalls: (url: string) => void;
focusPopout: () => void;
// Utility
unregister: (channel: string) => void;
}