1- /** 1.2.1 */
1+ /** 1.2.2 */
22
33// eslint-disable-next-line no-undef
44export as namespace SendBirdCall ;
@@ -12,24 +12,25 @@ export function removeListener(id: string): void;
1212export function removeAllListeners ( ) : void ;
1313export function dial ( params : DialParams , callback ?: DialHandler ) : DirectCall ;
1414export function createDirectCallLogListQuery ( params ?: DirectCallLogListQueryParams ) : DirectCallLogListQuery ;
15- export function getCurrentAudioInputDevice ( ) : MediaDeviceInfo ;
16- export function getAvailableAudioInputDevices ( ) : MediaDeviceInfo [ ] ;
17- export function selectAudioInputDevice ( mediaDeviceInfo : MediaDeviceInfo ) : void ;
15+ export function getCurrentAudioInputDevice ( ) : InputDeviceInfo ;
16+ export function getAvailableAudioInputDevices ( ) : InputDeviceInfo [ ] ;
17+ export function selectAudioInputDevice ( mediaDeviceInfo : InputDeviceInfo ) : void ;
1818export function getCurrentAudioOutputDevice ( ) : MediaDeviceInfo ;
1919export function getAvailableAudioOutputDevices ( ) : MediaDeviceInfo [ ] ;
2020export function selectAudioOutputDevice ( mediaDeviceInfo : MediaDeviceInfo ) : void ;
21- export function getCurrentVideoInputDevice ( ) : MediaDeviceInfo ;
22- export function getAvailableVideoInputDevices ( ) : MediaDeviceInfo [ ] ;
23- export function selectVideoInputDevice ( mediaDeviceInfo : MediaDeviceInfo ) : void ;
21+ export function getCurrentVideoInputDevice ( ) : InputDeviceInfo ;
22+ export function getAvailableVideoInputDevices ( ) : InputDeviceInfo [ ] ;
23+ export function selectVideoInputDevice ( mediaDeviceInfo : InputDeviceInfo ) : void ;
2424export function updateMediaDevices ( constraints : { audio : boolean ; video : boolean } ) : void ;
25- export function useMedia ( constraints : { audio : boolean ; video : boolean } ) : MediaAccess ;
25+ export function useMedia ( constraints : { audio : boolean ; video : boolean } ) : MediaAccess | undefined ;
2626export function updateCustomItems ( callId : string , customItems : CustomItems , callback ?: CustomItemsHandler ) : Promise < CustomItemsResult > ;
2727export function deleteCustomItems ( callId : string , customItemKeys : string [ ] , callback ?: CustomItemsHandler ) : Promise < CustomItemsResult > ;
2828export function deleteAllCustomItems ( callId : string , callback ?: CustomItemsHandler ) : Promise < CustomItemsResult > ;
2929export function setLoggerLevel ( level : LoggerLevel ) : LoggerLevel ;
3030export function getOngoingCallCount ( ) : number ;
3131export function setRingingTimeout ( timeout : number ) : void ;
3232export function setCallConnectionTimeout ( timeout : number ) : void ;
33+ export function handleWebhookData ( data : WebhookData ) : void ;
3334export function getCall ( callId : string ) : DirectCall ;
3435export const sdkVersion : string ;
3536export const appId : string ;
@@ -105,9 +106,9 @@ export enum ErrorCode {
105106
106107export interface SendBirdCallListener {
107108 onRinging : ( ( directCall : DirectCall ) => void ) | null ;
108- onAudioInputDeviceChanged : ( ( currentAudioInputDevice : MediaDeviceInfo , availableAudioInputDevices : MediaDeviceInfo [ ] ) => void ) | null ;
109+ onAudioInputDeviceChanged : ( ( currentAudioInputDevice : InputDeviceInfo , availableAudioInputDevices : InputDeviceInfo [ ] ) => void ) | null ;
109110 onAudioOutputDeviceChanged : ( ( currentAudioOutputDevice : MediaDeviceInfo , availableAudioOutputDevices : MediaDeviceInfo [ ] ) => void ) | null ;
110- onVideoInputDeviceChanged : ( ( currentVideoInputDevice : MediaDeviceInfo , availableVideoInputDevices : MediaDeviceInfo [ ] ) => void ) | null ;
111+ onVideoInputDeviceChanged : ( ( currentVideoInputDevice : InputDeviceInfo , availableVideoInputDevices : InputDeviceInfo [ ] ) => void ) | null ;
111112}
112113
113114export interface DirectCall {
@@ -142,8 +143,8 @@ export interface DirectCall {
142143 readonly localMediaView : HTMLMediaElement ;
143144 readonly remoteMediaView : HTMLMediaElement ;
144145
145- setLocalMediaView ( ) : Promise < void > ;
146- setRemoteMediaView ( ) : Promise < void > ;
146+ setLocalMediaView ( mediaView : HTMLMediaElement ) : Promise < void > ;
147+ setRemoteMediaView ( mediaView : HTMLMediaElement ) : Promise < void > ;
147148
148149 stopVideo ( ) : void ;
149150 startVideo ( ) : void ;
@@ -236,3 +237,17 @@ export interface CustomItems {
236237export interface MediaAccess {
237238 dispose ( ) : void ;
238239}
240+
241+ export interface WebhookData {
242+ category : string ;
243+ occured_at : number ;
244+ application_id : string ;
245+ sendbird_call ?: {
246+ version : number ;
247+ message_id : string ;
248+ cmd : string ;
249+ type : string ;
250+ payload : any ;
251+ } ;
252+ [ key : string ] : any ;
253+ }
0 commit comments