1- /** 0.7 .0 */
1+ /** 0.8 .0 */
22
33export as namespace SendBirdCall ;
44
@@ -13,11 +13,11 @@ export function dial(userId: string, isVideoCall: boolean, callOption: DirectCal
1313export function dial ( params : DialParams , callback ?: DialHandler ) : DirectCall ;
1414export function createDirectCallLogListQuery ( params ?: DirectCallLogListQueryParams ) : DirectCallLogListQuery ;
1515export function getCurrentAudioInputDevice ( ) : MediaDeviceInfo ;
16- export function getAvailableAudioInputDevices ( ) : MediaDeviceInfo [ ] ;
17- export function selectAudioInputDevice ( mediaDeviceInfo : MediaDeviceInfo ) : void ;
16+ export function getAvailableAudioInputDevices ( ) : Promise < MediaDeviceInfo [ ] > ;
17+ export function selectAudioInputDevice ( mediaDeviceInfo : MediaDeviceInfo ) : Promise < void > ;
1818export function getCurrentAudioOutputDevice ( ) : MediaDeviceInfo ;
19- export function getAvailableAudioOutputDevices ( ) : MediaDeviceInfo [ ] ;
20- export function selectAudioOutputDevice ( mediaDeviceInfo : MediaDeviceInfo ) : void ;
19+ export function getAvailableAudioOutputDevices ( ) : Promise < MediaDeviceInfo [ ] > ;
20+ export function selectAudioOutputDevice ( mediaDeviceInfo : MediaDeviceInfo ) : Promise < void > ;
2121export function updateCustomItems ( callId : string , customItems : CustomItems , callback ?: CustomItemsHandler ) : Promise < CustomItemsResult > ;
2222export function deleteCustomItems ( callId : string , customItemKeys : string [ ] , callback ?: CustomItemsHandler ) : Promise < CustomItemsResult > ;
2323export function deleteAllCustomItems ( callId : string , callback ?: CustomItemsHandler ) : Promise < CustomItemsResult > ;
@@ -63,8 +63,8 @@ export enum DirectCallEndResult {
6363
6464export interface SendBirdCallListener {
6565 onRinging : ( ( directCall : DirectCall ) => void ) | null ;
66- onAudioInputDeviceChanged : ( ( currentAudioInputDevice : MediaDeviceInfo , availableAudioInputDevices : MediaDeviceInfo [ ] ) => void ) | null ;
67- onAudioOutputDeviceChanged : ( ( currentAudioOutputDevice : MediaDeviceInfo , availableAudioOutputDevices : MediaDeviceInfo [ ] ) => void ) | null ;
66+ onAudioInputDeviceChanged : ( ( currentAudioInputDevice : MediaDeviceInfo , availableAudioInputDevices : MediaDeviceInfo [ ] ) => void ) | null ;
67+ onAudioOutputDeviceChanged : ( ( currentAudioOutputDevice : MediaDeviceInfo , availableAudioOutputDevices : MediaDeviceInfo [ ] ) => void ) | null ;
6868}
6969
7070export interface DirectCall {
@@ -76,6 +76,7 @@ export interface DirectCall {
7676 //deprecated
7777 onRemoteAudioEnabled : ( ( call : DirectCall ) => void ) | null ;
7878 onRemoteAudioSettingsChanged : ( ( call : DirectCall ) => void ) | null ;
79+ onRemoteVideoSettingsChanged : ( ( call : DirectCall ) => void ) | null ;
7980 onCustomItemsUpdated : ( ( call : DirectCall , updatedKeys : string [ ] ) => void ) | null ;
8081 onCustomItemsDeleted : ( ( call : DirectCall , deletedKeys : string [ ] ) => void ) | null ;
8182 onEnded : ( ( call : DirectCall ) => void ) | null ;
@@ -87,10 +88,20 @@ export interface DirectCall {
8788 readonly remoteUser : DirectCallUser ;
8889 readonly isLocalAudioEnabled : boolean ;
8990 readonly isRemoteAudioEnabled : boolean ;
91+ readonly isLocalVideoEnabled : boolean ;
92+ readonly isRemoteVideoEnabled : boolean ;
9093 readonly myRole : DirectCallUserRole ;
9194 readonly endedBy : DirectCallUser ;
9295 readonly endResult : DirectCallEndResult ;
9396 readonly customItems : CustomItems ;
97+ readonly localMediaView : HTMLMediaElement ;
98+ readonly remoteMediaView : HTMLMediaElement ;
99+
100+ setLocalMediaView ( ) : Promise < void > ;
101+ setRemoteMediaView ( ) : Promise < void > ;
102+
103+ stopVideo ( ) : void ;
104+ startVideo ( ) : void ;
94105
95106 getDuration ( ) : number ;
96107 accept ( callOption : DirectCallOption ) : void ;
@@ -112,11 +123,12 @@ export interface DirectCall {
112123}
113124
114125export interface DirectCallOption {
115- localMediaView ?: HTMLAudioElement | HTMLVideoElement ;
116- remoteMediaView ?: HTMLAudioElement | HTMLVideoElement ;
117- localVideoView ?: HTMLAudioElement | HTMLVideoElement ;
118- remoteVideoView ?: HTMLAudioElement | HTMLVideoElement ;
126+ localMediaView ?: HTMLMediaElement ;
127+ remoteMediaView ?: HTMLMediaElement ;
128+ localVideoView ?: HTMLMediaElement ;
129+ remoteVideoView ?: HTMLMediaElement ;
119130 audioEnabled ?: boolean ;
131+ videoEnabled ?: boolean ;
120132}
121133
122134declare const DirectCallOption : {
0 commit comments