Skip to content

Commit f0fff0e

Browse files
committed
0.8.0
1 parent 3398c9f commit f0fff0e

File tree

6 files changed

+55
-16
lines changed

6 files changed

+55
-16
lines changed

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# Change Log
22

3+
### 0.8.0 (Mar 9, 2020)
4+
* Interface for video call has been implemented
5+
* Below properties are added in `DirectCall`
6+
* `readonly isLocalVideoEnabled: boolean`
7+
* `readonly isRemoteVideoEnabled: boolean`
8+
* `readonly localMediaView: HTMLMediaElement`
9+
* `readonly remoteMediaView: HTMLMediaElement`
10+
11+
* Below methods are added in `DirectCall`
12+
* `setLocalMediaView(): Promise<void>`
13+
* `setRemoteMediaView(): Promise<void>`
14+
* `stopVideo(): void`
15+
* `startVideo(): void`
16+
17+
* Below implementable event listeners are added in `DirectCall`
18+
* `onRemoteVideoSettingsChanged: ((call: DirectCall) => void) | null`
19+
20+
* Below property is added in `DirectCallOption`
21+
* `videoEnabled?: boolean`
22+
23+
* Wrong type definitions have been fixed
24+
* Type definitions for below methods in class `SendBirdCall` has been fixed.
25+
* `getAvailableAudioInputDevices(): MediaDeviceInfo[]` -> `getAvailableAudioInputDevices(): Promise<MediaDeviceInfo[]>`
26+
* `selectAudioInputDevice(mediaDeviceInfo: MediaDeviceInfo): void` -> `selectAudioInputDevice(mediaDeviceInfo: MediaDeviceInfo): Promise<void>`
27+
* `getAvailableAudioOutputDevices(): MediaDeviceInfo[]` -> `getAvailableAudioOutputDevices(): Promise<MediaDeviceInfo[]>`
28+
* `selectAudioOutputDevice(mediaDeviceInfo: MediaDeviceInfo): void` -> `selectAudioOutputDevice(mediaDeviceInfo: MediaDeviceInfo): Promise<void>`
29+
330
### 0.7.0 (Feb 21, 2020)
431
* Selecting an audio input / output device is implemented.
532
* Below methods are added in `SendBirdCall`

SendBirdCall.min.d.ts

Lines changed: 23 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/** 0.7.0 */
1+
/** 0.8.0 */
22

33
export as namespace SendBirdCall;
44

@@ -13,11 +13,11 @@ export function dial(userId: string, isVideoCall: boolean, callOption: DirectCal
1313
export function dial(params: DialParams, callback?: DialHandler): DirectCall;
1414
export function createDirectCallLogListQuery(params?: DirectCallLogListQueryParams): DirectCallLogListQuery;
1515
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>;
1818
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>;
2121
export function updateCustomItems(callId: string, customItems: CustomItems, callback?: CustomItemsHandler): Promise<CustomItemsResult>;
2222
export function deleteCustomItems(callId: string, customItemKeys: string[], callback?: CustomItemsHandler): Promise<CustomItemsResult>;
2323
export function deleteAllCustomItems(callId: string, callback?: CustomItemsHandler): Promise<CustomItemsResult>;
@@ -63,8 +63,8 @@ export enum DirectCallEndResult {
6363

6464
export 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

7070
export 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

114125
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;
119130
audioEnabled?: boolean;
131+
videoEnabled?: boolean;
120132
}
121133

122134
declare const DirectCallOption: {

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.7.0",
3+
"version": "0.8.0",
44
"authors": [
55
"SendBird <[email protected]>"
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.7.0",
3+
"version": "0.8.0",
44
"description": "SendBird Calls JavaScript SDK",
55
"main": "SendBirdCall.min.js",
66
"types": "SendBirdCall.min.d.ts",

0 commit comments

Comments
 (0)