Skip to content

Commit a1bb155

Browse files
committed
1.0
1 parent 7327cb4 commit a1bb155

File tree

5 files changed

+22
-24
lines changed

5 files changed

+22
-24
lines changed

SendBirdCall.min.d.ts

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/** 0.9.0 */
1+
/** 1.0.0 */
22

33
export as namespace SendBirdCall;
44

@@ -9,15 +9,19 @@ export function connectWebSocket(): Promise<void>;
99
export function addListener(id: string, listener: SendBirdCallListener): void;
1010
export function removeListener(id: string): void;
1111
export function removeAllListeners(): void;
12-
export function dial(userId: string, isVideoCall: boolean, callOption: DirectCallOption, callback?: DialHandler): DirectCall;
1312
export function dial(params: DialParams, callback?: DialHandler): DirectCall;
1413
export function createDirectCallLogListQuery(params?: DirectCallLogListQueryParams): DirectCallLogListQuery;
1514
export function getCurrentAudioInputDevice(): MediaDeviceInfo;
16-
export function getAvailableAudioInputDevices(): Promise<MediaDeviceInfo[]>;
17-
export function selectAudioInputDevice(mediaDeviceInfo: MediaDeviceInfo): Promise<void>;
15+
export function getAvailableAudioInputDevices(): MediaDeviceInfo[];
16+
export function selectAudioInputDevice(mediaDeviceInfo: MediaDeviceInfo): void;
1817
export function getCurrentAudioOutputDevice(): MediaDeviceInfo;
19-
export function getAvailableAudioOutputDevices(): Promise<MediaDeviceInfo[]>;
20-
export function selectAudioOutputDevice(mediaDeviceInfo: MediaDeviceInfo): Promise<void>;
18+
export function getAvailableAudioOutputDevices(): MediaDeviceInfo[];
19+
export function selectAudioOutputDevice(mediaDeviceInfo: MediaDeviceInfo): void;
20+
export function getCurrentVideoInputDevice(): MediaDeviceInfo;
21+
export function getAvailableVideoInputDevices(): MediaDeviceInfo[];
22+
export function selectVideoInputDevice(mediaDeviceInfo: MediaDeviceInfo): void;
23+
export function updateMediaDevices(constraints: { audio: boolean; video: boolean }): void;
24+
export function useMedia(constraints: { audio: boolean; video: boolean }): MediaAccess;
2125
export function updateCustomItems(callId: string, customItems: CustomItems, callback?: CustomItemsHandler): Promise<CustomItemsResult>;
2226
export function deleteCustomItems(callId: string, customItemKeys: string[], callback?: CustomItemsHandler): Promise<CustomItemsResult>;
2327
export function deleteAllCustomItems(callId: string, callback?: CustomItemsHandler): Promise<CustomItemsResult>;
@@ -56,15 +60,16 @@ export enum DirectCallEndResult {
5660
COMPLETED = 'completed',
5761
CONNECTION_LOST = 'connection_lost',
5862
TIMED_OUT = 'timed_out',
59-
FAILED_TO_DIAL = 'failed_to_dial',
60-
FAILED_TO_ACCEPT = 'failed_to_accept',
63+
DIAL_FAILED = 'dial_failed',
64+
ACCEPT_FAILED = 'accept_failed',
6165
UNKNOWN = 'unknown'
6266
}
6367

6468
export interface SendBirdCallListener {
6569
onRinging: ((directCall: DirectCall) => void) | null;
6670
onAudioInputDeviceChanged: ((currentAudioInputDevice: MediaDeviceInfo, availableAudioInputDevices: MediaDeviceInfo[]) => void) | null;
6771
onAudioOutputDeviceChanged: ((currentAudioOutputDevice: MediaDeviceInfo, availableAudioOutputDevices: MediaDeviceInfo[]) => void) | null;
72+
onVideoInputDeviceChanged: ((currentVideoInputDevice: MediaDeviceInfo, availableVideoInputDevices: MediaDeviceInfo[]) => void) | null;
6873
}
6974

7075
export interface DirectCall {
@@ -73,8 +78,6 @@ export interface DirectCall {
7378
onReconnected: ((call: DirectCall) => void) | null;
7479
onReconnecting: ((call: DirectCall) => void) | null;
7580

76-
//deprecated
77-
onRemoteAudioEnabled: ((call: DirectCall) => void) | null;
7881
onRemoteAudioSettingsChanged: ((call: DirectCall) => void) | null;
7982
onRemoteVideoSettingsChanged: ((call: DirectCall) => void) | null;
8083
onCustomItemsUpdated: ((call: DirectCall, updatedKeys: string[]) => void) | null;
@@ -106,16 +109,9 @@ export interface DirectCall {
106109
startVideo(): void;
107110

108111
getDuration(): number;
109-
accept(callOption: DirectCallOption): void;
110112
accept(params: AcceptParams): void;
111113
end(): void;
112114

113-
//deprecated
114-
mute(): void;
115-
116-
//deprecated
117-
unmute(): void;
118-
119115
muteMicrophone(): void;
120116
unmuteMicrophone(): void;
121117

@@ -127,8 +123,6 @@ export interface DirectCall {
127123
export interface DirectCallOption {
128124
localMediaView?: HTMLMediaElement;
129125
remoteMediaView?: HTMLMediaElement;
130-
localVideoView?: HTMLMediaElement;
131-
remoteVideoView?: HTMLMediaElement;
132126
audioEnabled?: boolean;
133127
videoEnabled?: boolean;
134128
}
@@ -197,3 +191,7 @@ export interface DirectCallLogListQueryParams {
197191
export interface CustomItems {
198192
[key: string]: string;
199193
}
194+
195+
export interface MediaAccess {
196+
dispose(): void;
197+
}

SendBirdCall.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sendbird-calls",
3-
"version": "0.9.0",
3+
"version": "1.0.0",
44
"authors": [
55
"SendBird <support@sendbird.com>"
66
],

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sendbird-calls",
3-
"version": "0.9.0",
3+
"version": "1.0.0",
44
"description": "SendBird Calls JavaScript SDK",
55
"main": "SendBirdCall.min.js",
66
"types": "SendBirdCall.min.d.ts",

0 commit comments

Comments
 (0)