Skip to content

Commit 3398c9f

Browse files
committedFeb 21, 2020
0.7.0
1 parent d2615ce commit 3398c9f

6 files changed

+98
-9
lines changed
 

Diff for: ‎CHANGELOG.md

+46
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,51 @@
11
# Change Log
22

3+
### 0.7.0 (Feb 21, 2020)
4+
* Selecting an audio input / output device is implemented.
5+
* Below methods are added in `SendBirdCall`
6+
* `getCurrentAudioInputDevice(): MediaDeviceInfo`
7+
* `getAvailableAudioInputDevices(): MediaDeviceInfo[]`
8+
* `selectAudioInputDevice(mediaDeviceInfo: MediaDeviceInfo): void`
9+
* `getCurrentAudioOutputDevice(): MediaDeviceInfo`
10+
* `getAvailableAudioOutputDevices(): MediaDeviceInfo[]`
11+
* `selectAudioOutputDevice(mediaDeviceInfo: MediaDeviceInfo): void`
12+
* Below implementable event listeners are added in `SendBirdCallListener`
13+
* `onAudioInputDeviceChanged: ((currentAudioInputDevice: MediaDeviceInfo, availableAudioInputDevices: MediaDeviceInfo[]) => void) | null`
14+
* `onAudioOutputDeviceChanged: ((currentAudioOutputDevice: MediaDeviceInfo, availableAudioOutputDevices: MediaDeviceInfo[]) => void) | null`
15+
16+
17+
* Setting / retrieving custom items is implemented.
18+
* Below methods are added in `SendBirdCall`
19+
* `updateCustomItems(callId: string, customItems: CustomItems, callback?: CustomItemsHandler): Promise<CustomItemsResult>`
20+
* `deleteCustomItems(callId: string, customItemKeys: string[], callback?: CustomItemsHandler): Promise<CustomItemsResult>`
21+
* `deleteAllCustomItems(callId: string, callback?: CustomItemsHandler): Promise<CustomItemsResult>`
22+
* Below property is added in `DirectCall`
23+
* `readonly customItems: CustomItems`
24+
* Below methods are added in `DirectCall`
25+
* `updateCustomItems(customItems: CustomItems, callback?: CustomItemsHandler): Promise<CustomItemsResult>`
26+
* `deleteCustomItems(customItemsKeys: string[], callback?: CustomItemsHandler): Promise<CustomItemsResult>`
27+
* `deleteAllCustomItems(callback?: CustomItemsHandler): Promise<CustomItemsResult>`
28+
* Below implementable event listeners are added in `DirectCall`
29+
* `onCustomItemsUpdated: ((call: DirectCall, updatedKeys: string[]) => void) | null`
30+
* `onCustomItemsDeleted: ((call: DirectCall, deletedKeys: string[]) => void) | null`
31+
* Below property is added in `DirectCallLog`
32+
* `readonly customItems: CustomItems`
33+
34+
* Reconnection is implemented in `DirectCall`
35+
* Below implementable event listeners are added in `DirectCall`
36+
* `onReconnected: ((call: DirectCall) => void) | null`
37+
* `onReconnecting: ((call: DirectCall) => void) | null`
38+
39+
40+
* Signature of the `SendBirdCall.dial()` has been changed.
41+
* `dial(userId: string, isVideoCall: boolean, callOption: DirectCallOption, callback?: DialHandler): DirectCall` is now deprecated
42+
* `dial(params: DialParams, callback?: DialHandler): DirectCall` is now recommended.
43+
44+
* Signature of the `DirectCall.accept()` has been changed.
45+
* `accept(callOption: DirectCallOption): void` is now deprecated
46+
* `accept(params: AcceptParams): void` is now recommended.
47+
48+
349
### 0.6.10 (Jan 31, 2020)
450
* Added Typescript Definition.
551
* Polished error description.

Diff for: ‎SendBirdCall.min.d.ts

+47-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/** 0.6.10 */
1+
/** 0.7.0 */
22

33
export as namespace SendBirdCall;
44

@@ -9,14 +9,35 @@ 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: false, callOption: DirectCallOption, callback?: DialHandler): DirectCall;
12+
export function dial(userId: string, isVideoCall: boolean, callOption: DirectCallOption, callback?: DialHandler): DirectCall;
13+
export function dial(params: DialParams, callback?: DialHandler): DirectCall;
1314
export function createDirectCallLogListQuery(params?: DirectCallLogListQueryParams): DirectCallLogListQuery;
15+
export function getCurrentAudioInputDevice(): MediaDeviceInfo;
16+
export function getAvailableAudioInputDevices(): MediaDeviceInfo[];
17+
export function selectAudioInputDevice(mediaDeviceInfo: MediaDeviceInfo): void;
18+
export function getCurrentAudioOutputDevice(): MediaDeviceInfo;
19+
export function getAvailableAudioOutputDevices(): MediaDeviceInfo[];
20+
export function selectAudioOutputDevice(mediaDeviceInfo: MediaDeviceInfo): void;
21+
export function updateCustomItems(callId: string, customItems: CustomItems, callback?: CustomItemsHandler): Promise<CustomItemsResult>;
22+
export function deleteCustomItems(callId: string, customItemKeys: string[], callback?: CustomItemsHandler): Promise<CustomItemsResult>;
23+
export function deleteAllCustomItems(callId: string, callback?: CustomItemsHandler): Promise<CustomItemsResult>;
1424
export function setLoggerLevel(level: LoggerLevel);
1525
export function getCall(callId: string): DirectCall;
1626
export const sdkVersion: string;
1727
export const appId: string;
1828
export const currentUser: User;
1929

30+
export interface DialParams {
31+
userId: string;
32+
isVideoCall: boolean;
33+
callOption: DirectCallOption;
34+
customItems?: CustomItems;
35+
}
36+
37+
export interface AcceptParams {
38+
callOption: DirectCallOption;
39+
}
40+
2041
export enum LoggerLevel {
2142
NONE = 'NONE',
2243
ERROR = 'ERROR'
@@ -42,15 +63,21 @@ export enum DirectCallEndResult {
4263

4364
export interface SendBirdCallListener {
4465
onRinging: ((directCall: DirectCall) => void) | null;
66+
onAudioInputDeviceChanged: ((currentAudioInputDevice: MediaDeviceInfo, availableAudioInputDevices: MediaDeviceInfo[]) => void) | null;
67+
onAudioOutputDeviceChanged: ((currentAudioOutputDevice: MediaDeviceInfo, availableAudioOutputDevices: MediaDeviceInfo[]) => void) | null;
4568
}
4669

4770
export interface DirectCall {
4871
onEstablished: ((call: DirectCall) => void) | null;
4972
onConnected: ((call: DirectCall) => void) | null;
73+
onReconnected: ((call: DirectCall) => void) | null;
74+
onReconnecting: ((call: DirectCall) => void) | null;
5075

5176
//deprecated
5277
onRemoteAudioEnabled: ((call: DirectCall) => void) | null;
5378
onRemoteAudioSettingsChanged: ((call: DirectCall) => void) | null;
79+
onCustomItemsUpdated: ((call: DirectCall, updatedKeys: string[]) => void) | null;
80+
onCustomItemsDeleted: ((call: DirectCall, deletedKeys: string[]) => void) | null;
5481
onEnded: ((call: DirectCall) => void) | null;
5582

5683
readonly caller: DirectCallUser;
@@ -63,9 +90,11 @@ export interface DirectCall {
6390
readonly myRole: DirectCallUserRole;
6491
readonly endedBy: DirectCallUser;
6592
readonly endResult: DirectCallEndResult;
93+
readonly customItems: CustomItems;
6694

6795
getDuration(): number;
68-
accept(callOptions: DirectCallOption): void;
96+
accept(callOption: DirectCallOption): void;
97+
accept(params: AcceptParams): void;
6998
end(): void;
7099

71100
//deprecated
@@ -76,6 +105,10 @@ export interface DirectCall {
76105

77106
muteMicrophone(): void;
78107
unmuteMicrophone(): void;
108+
109+
updateCustomItems(customItems: CustomItems, callback?: CustomItemsHandler): Promise<CustomItemsResult>;
110+
deleteCustomItems(customItemsKeys: string[], callback?: CustomItemsHandler): Promise<CustomItemsResult>;
111+
deleteAllCustomItems(callback?: CustomItemsHandler): Promise<CustomItemsResult>;
79112
}
80113

81114
export interface DirectCallOption {
@@ -107,6 +140,7 @@ export interface DirectCallLog {
107140
readonly duration: number;
108141
readonly endResult: DirectCallEndResult;
109142
readonly isVideoCall: boolean;
143+
readonly customItems: CustomItems;
110144
}
111145

112146
export interface DirectCallUser {
@@ -126,6 +160,11 @@ export interface AuthOption {
126160
export type AuthHandler = (user?: User, error?: Error) => void;
127161
export type DialHandler = (call?: DirectCall, error?: Error) => void;
128162
export type CompletionHandler = (error?: Error) => void;
163+
export type CustomItemsHandler = (result?: CustomItemsResult, error?: Error) => void;
164+
export interface CustomItemsResult {
165+
readonly customItems: CustomItems;
166+
readonly affectedKeys: string[];
167+
}
129168

130169
export interface User {
131170
readonly userId: string;
@@ -139,4 +178,8 @@ export interface DirectCallLogListQueryParams {
139178
myRole?: DirectCallUserRole;
140179
endResults?: DirectCallEndResult[];
141180
limit?: number;
142-
}
181+
}
182+
183+
export interface CustomItems {
184+
[key: string]: string;
185+
}

Diff for: ‎SendBirdCall.min.js

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎bower.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sendbird-calls",
3-
"version": "0.6.10",
3+
"version": "0.7.0",
44
"authors": [
55
"SendBird <support@sendbird.com>"
66
],

Diff for: ‎package-lock.json

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: ‎package.json

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

0 commit comments

Comments
 (0)