1
- /** 0.7 .0 */
1
+ /** 0.8 .0 */
2
2
3
3
export as namespace SendBirdCall ;
4
4
@@ -13,11 +13,11 @@ export function dial(userId: string, isVideoCall: boolean, callOption: DirectCal
13
13
export function dial ( params : DialParams , callback ?: DialHandler ) : DirectCall ;
14
14
export function createDirectCallLogListQuery ( params ?: DirectCallLogListQueryParams ) : DirectCallLogListQuery ;
15
15
export 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 > ;
18
18
export 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 > ;
21
21
export function updateCustomItems ( callId : string , customItems : CustomItems , callback ?: CustomItemsHandler ) : Promise < CustomItemsResult > ;
22
22
export function deleteCustomItems ( callId : string , customItemKeys : string [ ] , callback ?: CustomItemsHandler ) : Promise < CustomItemsResult > ;
23
23
export function deleteAllCustomItems ( callId : string , callback ?: CustomItemsHandler ) : Promise < CustomItemsResult > ;
@@ -63,8 +63,8 @@ export enum DirectCallEndResult {
63
63
64
64
export interface SendBirdCallListener {
65
65
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 ;
68
68
}
69
69
70
70
export interface DirectCall {
@@ -76,6 +76,7 @@ export interface DirectCall {
76
76
//deprecated
77
77
onRemoteAudioEnabled : ( ( call : DirectCall ) => void ) | null ;
78
78
onRemoteAudioSettingsChanged : ( ( call : DirectCall ) => void ) | null ;
79
+ onRemoteVideoSettingsChanged : ( ( call : DirectCall ) => void ) | null ;
79
80
onCustomItemsUpdated : ( ( call : DirectCall , updatedKeys : string [ ] ) => void ) | null ;
80
81
onCustomItemsDeleted : ( ( call : DirectCall , deletedKeys : string [ ] ) => void ) | null ;
81
82
onEnded : ( ( call : DirectCall ) => void ) | null ;
@@ -87,10 +88,20 @@ export interface DirectCall {
87
88
readonly remoteUser : DirectCallUser ;
88
89
readonly isLocalAudioEnabled : boolean ;
89
90
readonly isRemoteAudioEnabled : boolean ;
91
+ readonly isLocalVideoEnabled : boolean ;
92
+ readonly isRemoteVideoEnabled : boolean ;
90
93
readonly myRole : DirectCallUserRole ;
91
94
readonly endedBy : DirectCallUser ;
92
95
readonly endResult : DirectCallEndResult ;
93
96
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 ;
94
105
95
106
getDuration ( ) : number ;
96
107
accept ( callOption : DirectCallOption ) : void ;
@@ -112,11 +123,12 @@ export interface DirectCall {
112
123
}
113
124
114
125
export 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 ;
119
130
audioEnabled ?: boolean ;
131
+ videoEnabled ?: boolean ;
120
132
}
121
133
122
134
declare const DirectCallOption : {
0 commit comments