@vkontakte/calls-sdk 2.6.2-dev.6d2004b.0 → 2.6.2-dev.71267ed.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CallsSDK.d.ts +18 -7
- package/abstract/BaseApi.d.ts +1 -1
- package/abstract/BaseSignaling.d.ts +5 -1
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +12 -3
- package/classes/ProducerCommandSerializationService.d.ts +2 -0
- package/classes/codec/IEncoder.d.ts +3 -0
- package/classes/codec/LibVPxEncoder.d.ts +4 -1
- package/classes/codec/Types.d.ts +6 -1
- package/classes/codec/WebCodecsEncoder.d.ts +4 -1
- package/classes/screenshare/PacketHistory.d.ts +30 -0
- package/classes/screenshare/PacketHistory.test.d.ts +1 -0
- package/classes/screenshare/ScreenCaptureSender.d.ts +15 -1
- package/classes/screenshare/ScreenCongestionControl.d.ts +25 -0
- package/classes/screenshare/SharingStatReport.d.ts +6 -0
- package/classes/screenshare/Utils.d.ts +5 -0
- package/default/Api.d.ts +1 -1
- package/default/Signaling.d.ts +5 -1
- package/enums/LiveStatus.d.ts +7 -0
- package/enums/SignalingCommandType.d.ts +4 -1
- package/enums/SignalingNotification.d.ts +4 -1
- package/package.json +1 -1
- package/static/External.d.ts +21 -3
- package/static/Params.d.ts +25 -3
- package/static/Polyfills.d.ts +6 -0
- package/types/Asr.d.ts +5 -0
- package/types/ConversationFeature.d.ts +3 -0
- package/types/MovieShare.d.ts +4 -1
- package/types/Participant.d.ts +1 -0
- package/types/Room.d.ts +16 -4
- package/types/SignalingMessage.d.ts +18 -3
- package/utils/ArrayDequeue.d.ts +24 -0
- package/utils/ArrayDequeue.spec.d.ts +1 -0
- package/worker/LibVPxEncoderWorker.d.ts +1 -1
|
@@ -12,6 +12,8 @@ import UpdateDisplayLayoutErrorReason from '../enums/UpdateDisplayLayoutErrorRea
|
|
|
12
12
|
import UserRole from '../enums/UserRole';
|
|
13
13
|
import UserType from '../enums/UserType';
|
|
14
14
|
import { JSONObject } from '../static/Json';
|
|
15
|
+
import { IFeaturesPerRole } from '../types/ConversationFeature';
|
|
16
|
+
import { AsrInfo } from '../types/Asr';
|
|
15
17
|
import { ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalUserId } from '../types/ExternalId';
|
|
16
18
|
import MediaModifiers from '../types/MediaModifiers';
|
|
17
19
|
import { IVideoDimentions } from '../types/MediaSettings';
|
|
@@ -38,7 +40,7 @@ export declare type ConversationData = {
|
|
|
38
40
|
*/
|
|
39
41
|
acceptTime: number | null;
|
|
40
42
|
features: ConversationFeature[];
|
|
41
|
-
featuresPerRole?:
|
|
43
|
+
featuresPerRole?: IFeaturesPerRole | null;
|
|
42
44
|
/**
|
|
43
45
|
* ID звонка
|
|
44
46
|
*/
|
|
@@ -50,6 +52,7 @@ export declare type ConversationData = {
|
|
|
50
52
|
needRate: boolean;
|
|
51
53
|
recordInfo: RecordInfo | null;
|
|
52
54
|
chatId: string | null;
|
|
55
|
+
asrInfo: AsrInfo | null;
|
|
53
56
|
/**
|
|
54
57
|
* Роли пользователя
|
|
55
58
|
*/
|
|
@@ -116,6 +119,7 @@ export default class Conversation extends EventEmitter {
|
|
|
116
119
|
chatId?: string;
|
|
117
120
|
joinLink?: string;
|
|
118
121
|
observedIds?: ExternalUserId[];
|
|
122
|
+
payload?: string;
|
|
119
123
|
}): Promise<ConversationData>;
|
|
120
124
|
private _onJoinPart2;
|
|
121
125
|
onPush(conversationId: string, type?: UserType, peerId?: number): Promise<void>;
|
|
@@ -215,15 +219,19 @@ export default class Conversation extends EventEmitter {
|
|
|
215
219
|
private _onChatRoomUpdated;
|
|
216
220
|
private _onSharedMovieUpdate;
|
|
217
221
|
private _onSharedMovieInfoStarted;
|
|
222
|
+
private _processSharedMovieInfos;
|
|
218
223
|
private _processSharedMovieInfo;
|
|
219
224
|
private _processConnectionSharedMovieInfo;
|
|
220
225
|
private _onSharedMovieInfoStopped;
|
|
226
|
+
private _onFeaturesPerRoleChanged;
|
|
221
227
|
private _waitForStreamIfNeeded;
|
|
222
228
|
private _matchStreamDescription;
|
|
223
229
|
private _getWaitingTime;
|
|
224
230
|
private _isCallAdmin;
|
|
225
231
|
private _checkAdminRole;
|
|
226
232
|
grantRoles(participantId: CompositeUserId, roles: UserRole[], revoke: boolean): Promise<void>;
|
|
233
|
+
startAsr(): Promise<void>;
|
|
234
|
+
stopAsr(): Promise<void>;
|
|
227
235
|
muteParticipant(participantId: ParticipantId | null, muteStates: MuteStates, requestedMedia?: MediaOption[]): Promise<void>;
|
|
228
236
|
enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<void>;
|
|
229
237
|
pinParticipant(participantId: ParticipantId, unpin: boolean): Promise<void>;
|
|
@@ -252,8 +260,8 @@ export default class Conversation extends EventEmitter {
|
|
|
252
260
|
activateRooms(roomIds: number[], deactivate: boolean): Promise<void>;
|
|
253
261
|
switchRoom(toRoomId?: number, participantId?: ParticipantId): Promise<void>;
|
|
254
262
|
removeRooms(roomIds: number[]): Promise<void>;
|
|
255
|
-
startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null): Promise<SignalingMessage>;
|
|
256
|
-
stopStream(): Promise<SignalingMessage>;
|
|
263
|
+
startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null): Promise<SignalingMessage>;
|
|
264
|
+
stopStream(roomId?: number | null): Promise<SignalingMessage>;
|
|
257
265
|
recordSetRole(participantId: ParticipantId, role: RecordRole | null): Promise<void>;
|
|
258
266
|
getStreamInfo(): Promise<{
|
|
259
267
|
movieId: any;
|
|
@@ -292,6 +300,7 @@ export default class Conversation extends EventEmitter {
|
|
|
292
300
|
private _onChatMessage;
|
|
293
301
|
private _onCustomData;
|
|
294
302
|
private _onRecordInfo;
|
|
303
|
+
private _onAsrInfo;
|
|
295
304
|
private _onRolesChanged;
|
|
296
305
|
/**
|
|
297
306
|
* Клиент должен немедленно выключить микрофон и/или камеру
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import ParticipantLayout, { RequestKeyFrame, StopStream } from '../types/ParticipantLayout';
|
|
2
2
|
import SignalingMessage from '../types/SignalingMessage';
|
|
3
|
+
import { SharingStatReport } from '../classes/screenshare/SharingStatReport';
|
|
3
4
|
import { ParticipantIdRegistry } from './ParticipantIdRegistry';
|
|
4
5
|
import { PerfStatReport } from './transport/PerfStatReporter';
|
|
5
6
|
export declare class ProducerCommandSerializationService {
|
|
@@ -11,6 +12,7 @@ export declare class ProducerCommandSerializationService {
|
|
|
11
12
|
private writeLayout;
|
|
12
13
|
private writeStreamDesc;
|
|
13
14
|
serializePerfStatReport(sequenceNumber: number, report: PerfStatReport): ArrayBuffer;
|
|
15
|
+
serializeSharingStatReport(sequenceNumber: number, report: SharingStatReport): ArrayBuffer;
|
|
14
16
|
deserializeCommandResponse(data: BufferSource | Blob): Promise<SignalingMessage | undefined>;
|
|
15
17
|
private deserializeUpdateDisplayLayoutResponse;
|
|
16
18
|
private deserializeReportPerfStatResponse;
|
|
@@ -4,6 +4,7 @@ export default interface IEncoder {
|
|
|
4
4
|
requestFrame(keyFrame: boolean): void;
|
|
5
5
|
isVP9(): boolean;
|
|
6
6
|
destroy(): void;
|
|
7
|
+
setBitrate(bitrate: number, useCbr: boolean): void;
|
|
7
8
|
}
|
|
8
9
|
export interface FrameMessage {
|
|
9
10
|
type: MessageType;
|
|
@@ -12,4 +13,6 @@ export interface FrameMessage {
|
|
|
12
13
|
duration?: number;
|
|
13
14
|
data?: ArrayBuffer;
|
|
14
15
|
error?: string;
|
|
16
|
+
width?: number;
|
|
17
|
+
height?: number;
|
|
15
18
|
}
|
|
@@ -4,6 +4,8 @@ import WorkerBase from './WorkerBase';
|
|
|
4
4
|
export default class LibVPxEncoder extends WorkerBase implements IEncoder {
|
|
5
5
|
private readonly _sourceTrack;
|
|
6
6
|
private readonly _onFrame;
|
|
7
|
+
private readonly _useCongestionControl;
|
|
8
|
+
private readonly _maxBitrate;
|
|
7
9
|
private readonly _useImageCapture;
|
|
8
10
|
private _video;
|
|
9
11
|
private _imageCapture;
|
|
@@ -13,7 +15,7 @@ export default class LibVPxEncoder extends WorkerBase implements IEncoder {
|
|
|
13
15
|
private _track;
|
|
14
16
|
private _frameReadTimeout;
|
|
15
17
|
private _lastFrame;
|
|
16
|
-
constructor(sourceTrack: MediaStreamTrack, onFrame: OnFrameCallback);
|
|
18
|
+
constructor(sourceTrack: MediaStreamTrack, onFrame: OnFrameCallback, useCongestionControl: boolean, maxBitrate: number);
|
|
17
19
|
private _createDom;
|
|
18
20
|
private _removeDom;
|
|
19
21
|
private _createStream;
|
|
@@ -27,6 +29,7 @@ export default class LibVPxEncoder extends WorkerBase implements IEncoder {
|
|
|
27
29
|
private _requestFrameVideo;
|
|
28
30
|
private _requestFrameBitmap;
|
|
29
31
|
requestFrame(keyFrame?: boolean): void;
|
|
32
|
+
setBitrate(bitrate: number, useCbr?: boolean): void;
|
|
30
33
|
isVP9(): boolean;
|
|
31
34
|
destroy(): void;
|
|
32
35
|
static isBrowserSupported(): boolean;
|
package/classes/codec/Types.d.ts
CHANGED
|
@@ -6,9 +6,14 @@ export declare const enum MessageType {
|
|
|
6
6
|
INIT = "init",
|
|
7
7
|
READY = "ready",
|
|
8
8
|
FRAME = "frame",
|
|
9
|
+
SET_BITRATE = "set_bitrate",
|
|
9
10
|
ERROR = "error",
|
|
10
11
|
DEBUG = "debug",
|
|
11
12
|
LOG_ERROR = "log_error"
|
|
12
13
|
}
|
|
13
|
-
export declare type EncodedVideoFrame = Pick<EncodedVideoChunk, 'type' | 'timestamp' | 'duration' | 'byteLength' | 'data'
|
|
14
|
+
export declare type EncodedVideoFrame = Pick<EncodedVideoChunk, 'type' | 'timestamp' | 'duration' | 'byteLength' | 'data'> & {
|
|
15
|
+
width: number;
|
|
16
|
+
height: number;
|
|
17
|
+
};
|
|
14
18
|
export declare type OnFrameCallback = (chunk: EncodedVideoFrame | null, error?: string) => void;
|
|
19
|
+
export declare type OnCongestionCallback = (bitrate: number, useCbr: boolean) => void;
|
|
@@ -5,9 +5,12 @@ export default class WebCodecsEncoder extends WorkerBase implements IEncoder {
|
|
|
5
5
|
private readonly _sourceTrack;
|
|
6
6
|
private readonly _trackProcessor;
|
|
7
7
|
private readonly _onFrame;
|
|
8
|
-
|
|
8
|
+
private readonly _useCongestionControl;
|
|
9
|
+
private readonly _maxBitrate;
|
|
10
|
+
constructor(sourceTrack: MediaStreamTrack, onFrame: OnFrameCallback, useCongestionControl: boolean, maxBitrate: number);
|
|
9
11
|
init(): Promise<void>;
|
|
10
12
|
requestFrame(keyFrame?: boolean): void;
|
|
13
|
+
setBitrate(bitrate: number, useCbr: boolean): void;
|
|
11
14
|
isVP9(): boolean;
|
|
12
15
|
destroy(): void;
|
|
13
16
|
static isBrowserSupported(): boolean;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
declare type HistoryRecord = {
|
|
2
|
+
seq: number;
|
|
3
|
+
ts: number;
|
|
4
|
+
size: number;
|
|
5
|
+
sent: number;
|
|
6
|
+
start: boolean;
|
|
7
|
+
end: boolean;
|
|
8
|
+
ts2: number;
|
|
9
|
+
recv: number;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* Class calculates server bitrate and delay, based on server cc feedback
|
|
13
|
+
* Ring buffer to keep sent packets info (HistoryRecord)
|
|
14
|
+
* Packet info is updated when cc feedback is received from server
|
|
15
|
+
*/
|
|
16
|
+
export default class PacketHistory {
|
|
17
|
+
private readonly _maxSize;
|
|
18
|
+
private _size;
|
|
19
|
+
private readonly _buffer;
|
|
20
|
+
private _head;
|
|
21
|
+
private _tail;
|
|
22
|
+
constructor(maxSize: number);
|
|
23
|
+
add(seq: number, ts: number, size: number, start: boolean, end: boolean): number;
|
|
24
|
+
update(seq: number, ts2: number): HistoryRecord;
|
|
25
|
+
get(seq: number): HistoryRecord;
|
|
26
|
+
getServerBitrateK(windowMs: number): number;
|
|
27
|
+
getCurrentDelay(): number;
|
|
28
|
+
getMaxBandwidth(): number;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,10 +1,19 @@
|
|
|
1
|
+
import BaseSignaling from '../../abstract/BaseSignaling';
|
|
1
2
|
export default class ScreenCaptureSender {
|
|
2
3
|
private readonly _encoder;
|
|
3
4
|
private readonly _datachannel;
|
|
5
|
+
private readonly _signaling;
|
|
4
6
|
private _destroyed;
|
|
5
7
|
private _needKeyframe;
|
|
6
8
|
private readonly DATA_SIZE;
|
|
7
|
-
|
|
9
|
+
private _congestionControl;
|
|
10
|
+
private _frameNum;
|
|
11
|
+
private _width;
|
|
12
|
+
private _height;
|
|
13
|
+
private _feedback;
|
|
14
|
+
private _lastSharingStat;
|
|
15
|
+
private _congestionControlEnabled;
|
|
16
|
+
constructor(track: MediaStreamTrack, datachannel: RTCDataChannel, signaling: BaseSignaling);
|
|
8
17
|
private _requestFrame;
|
|
9
18
|
private _wrapHeader;
|
|
10
19
|
private _stopPacket;
|
|
@@ -12,4 +21,9 @@ export default class ScreenCaptureSender {
|
|
|
12
21
|
private _sendChunk;
|
|
13
22
|
destroy(): void;
|
|
14
23
|
static isBrowserSupported(): boolean;
|
|
24
|
+
private _onCongestionCallback;
|
|
25
|
+
private _onResize;
|
|
26
|
+
private _calcMinMaxBitrate;
|
|
27
|
+
private _checkCcFeedback;
|
|
28
|
+
private _sendSharingStat;
|
|
15
29
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { OnCongestionCallback } from '../codec/Types';
|
|
2
|
+
import { SharingStatReport } from './SharingStatReport';
|
|
3
|
+
export default class ScreenCongestionControl {
|
|
4
|
+
private readonly _onCongestion;
|
|
5
|
+
private readonly _ccEnabled;
|
|
6
|
+
private _minBitrate;
|
|
7
|
+
private _maxBitrate;
|
|
8
|
+
private _targetBitrate;
|
|
9
|
+
private _lastDown;
|
|
10
|
+
private _lastUp;
|
|
11
|
+
private _lastProbing;
|
|
12
|
+
private _lastCheckDelay;
|
|
13
|
+
private _upPenalty;
|
|
14
|
+
private _probing;
|
|
15
|
+
private _delayAvgShort;
|
|
16
|
+
private _delayAvgLong;
|
|
17
|
+
private _minDelay;
|
|
18
|
+
private _maxDelay;
|
|
19
|
+
private _largeDelayDuration;
|
|
20
|
+
constructor(onCongestion: OnCongestionCallback, minBitrate: number, maxBitrate: number, ccEnabled: boolean);
|
|
21
|
+
checkDelay(frameNum: number, delay: number, bitrateK: number): void;
|
|
22
|
+
private _calcDelay;
|
|
23
|
+
reconfigure(minBitrate: number, maxBitrate: number): void;
|
|
24
|
+
getStat(): SharingStatReport;
|
|
25
|
+
}
|
|
@@ -15,3 +15,8 @@ export interface FrameChunk extends FrameChunkHeader {
|
|
|
15
15
|
export declare function wrapHeader(timestamp: number, start: boolean, end: boolean, keyframe: boolean, sequence: number, isVP9: boolean, data: ArrayBuffer | null): ArrayBuffer;
|
|
16
16
|
export declare function parseChunk(data: ArrayBuffer): FrameChunk;
|
|
17
17
|
export declare function isKeyframeRequested(data?: ArrayBuffer): boolean;
|
|
18
|
+
export interface CcFeedback {
|
|
19
|
+
seq: number;
|
|
20
|
+
ts2: number;
|
|
21
|
+
}
|
|
22
|
+
export declare function parseCcFeedback(data?: ArrayBuffer): CcFeedback;
|
package/default/Api.d.ts
CHANGED
|
@@ -31,7 +31,7 @@ export default class Api extends BaseApi {
|
|
|
31
31
|
success: boolean;
|
|
32
32
|
}>;
|
|
33
33
|
getAnonymTokenByLink(joinLink: string, username?: string): Promise<string>;
|
|
34
|
-
joinConversationByLink(joinLink: string, isVideo?: boolean, observedIds?: ExternalUserId[]): Promise<ConversationResponse>;
|
|
34
|
+
joinConversationByLink(joinLink: string, isVideo?: boolean, observedIds?: ExternalUserId[], payload?: string): Promise<ConversationResponse>;
|
|
35
35
|
/**
|
|
36
36
|
* NB: Не сохраняет порядок возвращаемых ID
|
|
37
37
|
* @hidden
|
package/default/Signaling.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ import ParticipantLayout, { RequestKeyFrame, StopStream } from '../types/Partici
|
|
|
19
19
|
import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
|
|
20
20
|
import SignalingMessage from '../types/SignalingMessage';
|
|
21
21
|
import { WaitingParticipantId } from '../types/WaitingHall';
|
|
22
|
+
import { SharingStatReport } from '../classes/screenshare/SharingStatReport';
|
|
22
23
|
export default class Signaling extends BaseSignaling {
|
|
23
24
|
private socket;
|
|
24
25
|
protected sequence: number;
|
|
@@ -106,12 +107,13 @@ export default class Signaling extends BaseSignaling {
|
|
|
106
107
|
switchRoom(toRoomId?: number, participantId?: ParticipantId): Promise<SignalingMessage>;
|
|
107
108
|
removeRooms(roomIds: number[]): Promise<SignalingMessage>;
|
|
108
109
|
startStream(data: any): Promise<SignalingMessage>;
|
|
109
|
-
stopStream(): Promise<SignalingMessage>;
|
|
110
|
+
stopStream(data: any): Promise<SignalingMessage>;
|
|
110
111
|
recordSetRole(participantId: ParticipantId, role: RecordRole | null): Promise<SignalingMessage>;
|
|
111
112
|
getRecordStatus(): Promise<SignalingMessage>;
|
|
112
113
|
switchTopology(topology: TransportTopology, force?: boolean): Promise<SignalingMessage>;
|
|
113
114
|
requestRealloc(): Promise<SignalingMessage>;
|
|
114
115
|
reportPerfStat(report: PerfStatReport): Promise<SignalingMessage>;
|
|
116
|
+
reportSharingStat(report: SharingStatReport): Promise<SignalingMessage>;
|
|
115
117
|
chatMessage(message: string, participantId?: CompositeUserId | null): Promise<SignalingMessage>;
|
|
116
118
|
chatHistory(count: number): Promise<SignalingMessage>;
|
|
117
119
|
customData(data: JSONObject, participantId: ParticipantId | null): Promise<SignalingMessage>;
|
|
@@ -139,6 +141,8 @@ export default class Signaling extends BaseSignaling {
|
|
|
139
141
|
readyToSend(): void;
|
|
140
142
|
getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<SignalingMessage>;
|
|
141
143
|
getParticipants(externalIds: SignalingMessage.ExternalId[]): Promise<SignalingMessage>;
|
|
144
|
+
startAsr(): Promise<SignalingMessage>;
|
|
145
|
+
stopAsr(): Promise<SignalingMessage>;
|
|
142
146
|
protected _connect(connectionType: SignalingConnectionType): void;
|
|
143
147
|
protected _disconnect(): void;
|
|
144
148
|
private _onOpen;
|
|
@@ -12,6 +12,7 @@ declare enum SignalingCommandType {
|
|
|
12
12
|
CHANGE_STREAM_PRIORITIES = "change-streams-priorities",
|
|
13
13
|
UPDATE_DISPLAY_LAYOUT = "update-display-layout",
|
|
14
14
|
REPORT_PERF_STAT = "report-perf-stat",
|
|
15
|
+
REPORT_SHARING_STAT = "report-sharing-stat",
|
|
15
16
|
RECORD_START = "record-start",
|
|
16
17
|
RECORD_STOP = "record-stop",
|
|
17
18
|
RECORD_SET_ROLE = "record-set-role",
|
|
@@ -42,6 +43,8 @@ declare enum SignalingCommandType {
|
|
|
42
43
|
ACTIVATE_ROOMS = "activate-rooms",
|
|
43
44
|
REMOVE_ROOMS = "remove-rooms",
|
|
44
45
|
SWITCH_ROOM = "switch-room",
|
|
45
|
-
FEEDBACK = "feedback"
|
|
46
|
+
FEEDBACK = "feedback",
|
|
47
|
+
ASR_START = "asr-start",
|
|
48
|
+
ASR_STOP = "asr-stop"
|
|
46
49
|
}
|
|
47
50
|
export default SignalingCommandType;
|
|
@@ -43,6 +43,9 @@ declare enum SignalingNotification {
|
|
|
43
43
|
MOVIE_SHARE_STOPPED = "movie-share-stopped",
|
|
44
44
|
ROOM_UPDATED = "room-updated",
|
|
45
45
|
ROOMS_UPDATED = "rooms-updated",
|
|
46
|
-
ROOM_PARTICIPANTS_UPDATED = "room-participants-updated"
|
|
46
|
+
ROOM_PARTICIPANTS_UPDATED = "room-participants-updated",
|
|
47
|
+
FEATURES_PER_ROLE_CHANGED = "features-per-role-changed",
|
|
48
|
+
ASR_STARTED = "asr-started",
|
|
49
|
+
ASR_STOPPED = "asr-stopped"
|
|
47
50
|
}
|
|
48
51
|
export default SignalingNotification;
|
package/package.json
CHANGED
package/static/External.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import FatalError from '../enums/FatalError';
|
|
|
8
8
|
import MediaOption from '../enums/MediaOption';
|
|
9
9
|
import RoomsEventType from '../enums/RoomsEventType';
|
|
10
10
|
import UserRole from '../enums/UserRole';
|
|
11
|
+
import { IFeaturesPerRole } from '../types/ConversationFeature';
|
|
11
12
|
import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalParticipantListMarkers } from '../types/ExternalId';
|
|
12
13
|
import { IFeedbackExternal } from '../types/Feedback';
|
|
13
14
|
import MediaModifiers from '../types/MediaModifiers';
|
|
@@ -15,7 +16,7 @@ import MediaSettings from '../types/MediaSettings';
|
|
|
15
16
|
import { IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
|
|
16
17
|
import MuteStates from '../types/MuteStates';
|
|
17
18
|
import { ParticipantStateMapped } from '../types/Participant';
|
|
18
|
-
import { Room, RoomParticipantUpdate, RoomsUpdate } from '../types/Room';
|
|
19
|
+
import { Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from '../types/Room';
|
|
19
20
|
import { DebugMessageType } from './Debug';
|
|
20
21
|
import { JSONObject } from './Json';
|
|
21
22
|
/**
|
|
@@ -116,8 +117,9 @@ declare namespace External {
|
|
|
116
117
|
* @param mediaModifiers Текущие настройки пользовательского медиа
|
|
117
118
|
* @param muteStates Состояние устройств при входе в звонок
|
|
118
119
|
* @param participants Список участников звонка (при `Params.batchParticipantsOnStart = true`)
|
|
120
|
+
* @param rooms Список комнат в звонке
|
|
119
121
|
*/
|
|
120
|
-
function onConversation(userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[], rooms?:
|
|
122
|
+
function onConversation(userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[], rooms?: Rooms): void;
|
|
121
123
|
/**
|
|
122
124
|
* Постраничные данные про участников при начале звонка
|
|
123
125
|
* @param chunk
|
|
@@ -420,7 +422,7 @@ declare namespace External {
|
|
|
420
422
|
function onRoomsUpdated(updates: Partial<Record<RoomsEventType, RoomsUpdate>>): void;
|
|
421
423
|
/**
|
|
422
424
|
*/
|
|
423
|
-
function onRoomUpdated(eventTypes: RoomsEventType[], roomId: number, room: Room | null): void;
|
|
425
|
+
function onRoomUpdated(eventTypes: RoomsEventType[], roomId: number, room: Room | null, deactivate: boolean | null): void;
|
|
424
426
|
/**
|
|
425
427
|
*/
|
|
426
428
|
function onRoomParticipantsUpdated(update: RoomParticipantUpdate): void;
|
|
@@ -428,5 +430,21 @@ declare namespace External {
|
|
|
428
430
|
* Получена новая реакция
|
|
429
431
|
*/
|
|
430
432
|
function onFeedback(feedback: IFeedbackExternal[]): void;
|
|
433
|
+
/**
|
|
434
|
+
* Изменилось состояние пермиссий фич в звонке
|
|
435
|
+
*
|
|
436
|
+
* @param featuresPerRole Информация о доступных фичах по ролям
|
|
437
|
+
*/
|
|
438
|
+
function onFeaturesPerRoleChanged(featuresPerRole: IFeaturesPerRole): void;
|
|
439
|
+
/**
|
|
440
|
+
* Начата текстовая расшифровка звонка
|
|
441
|
+
* @param initiatorId Id пользователя, запустившего расшифровку звонка
|
|
442
|
+
* @param movieId Id расшифровки
|
|
443
|
+
*/
|
|
444
|
+
function onAsrStarted(initiatorId: ExternalParticipantId, movieId: number): void;
|
|
445
|
+
/**
|
|
446
|
+
* Закончена текстовая расшифровка звонка
|
|
447
|
+
*/
|
|
448
|
+
function onAsrStopped(): void;
|
|
431
449
|
}
|
|
432
450
|
export default External;
|
package/static/Params.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ import FatalError from '../enums/FatalError';
|
|
|
8
8
|
import MediaOption from '../enums/MediaOption';
|
|
9
9
|
import RoomsEventType from '../enums/RoomsEventType';
|
|
10
10
|
import UserRole from '../enums/UserRole';
|
|
11
|
+
import { IFeaturesPerRole } from '../types/ConversationFeature';
|
|
11
12
|
import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalParticipantListMarkers } from '../types/ExternalId';
|
|
12
13
|
import { IFeedbackExternal } from '../types/Feedback';
|
|
13
14
|
import IceServer from '../types/IceServer';
|
|
@@ -16,7 +17,7 @@ import MediaSettings from '../types/MediaSettings';
|
|
|
16
17
|
import { IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
|
|
17
18
|
import MuteStates from '../types/MuteStates';
|
|
18
19
|
import { ParticipantStateMapped } from '../types/Participant';
|
|
19
|
-
import { Room, RoomParticipantUpdate, RoomsUpdate } from '../types/Room';
|
|
20
|
+
import { Room, RoomParticipantUpdate, Rooms, RoomsUpdate } from '../types/Room';
|
|
20
21
|
import AuthData from './AuthData';
|
|
21
22
|
import { DebugMessageType } from './Debug';
|
|
22
23
|
import { ParticipantStatus } from './External';
|
|
@@ -289,6 +290,11 @@ export declare type ParamsObject = {
|
|
|
289
290
|
* @hidden
|
|
290
291
|
*/
|
|
291
292
|
preserveAudioTracks: boolean;
|
|
293
|
+
/**
|
|
294
|
+
* Использовать congestion control для шаринга
|
|
295
|
+
* @hidden
|
|
296
|
+
*/
|
|
297
|
+
screenShareCongestionControl: boolean;
|
|
292
298
|
/**
|
|
293
299
|
* Получен локальный стрим с камеры/микрофона
|
|
294
300
|
*/
|
|
@@ -336,7 +342,7 @@ export declare type ParamsObject = {
|
|
|
336
342
|
/**
|
|
337
343
|
* Начат звонок
|
|
338
344
|
*/
|
|
339
|
-
onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[], rooms?:
|
|
345
|
+
onConversation?: (userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[], rooms?: Rooms) => void;
|
|
340
346
|
/**
|
|
341
347
|
* Начальный список участников для постраничного звонка
|
|
342
348
|
*/
|
|
@@ -531,12 +537,20 @@ export declare type ParamsObject = {
|
|
|
531
537
|
*/
|
|
532
538
|
onJoinLinkChanged?: (joinLink: string) => void;
|
|
533
539
|
/**
|
|
540
|
+
* Получено обновление списка комнат
|
|
541
|
+
* @param updates список обновлений по комнатам
|
|
534
542
|
*/
|
|
535
543
|
onRoomsUpdated?: (updates: Partial<Record<RoomsEventType, RoomsUpdate>>) => void;
|
|
536
544
|
/**
|
|
545
|
+
* Получено обновление комнаты
|
|
546
|
+
* @param eventTypes список событий
|
|
547
|
+
* @param roomId номер комнаты
|
|
548
|
+
* @param room комната
|
|
537
549
|
*/
|
|
538
|
-
onRoomUpdated?: (eventTypes: RoomsEventType[], roomId: number, room: Room | null) => void;
|
|
550
|
+
onRoomUpdated?: (eventTypes: RoomsEventType[], roomId: number, room: Room | null, deactivate: boolean | null) => void;
|
|
539
551
|
/**
|
|
552
|
+
* Получение обновление списка участников в комнате
|
|
553
|
+
* @param update обновление списка участников
|
|
540
554
|
*/
|
|
541
555
|
onRoomParticipantsUpdated?: (update: RoomParticipantUpdate) => void;
|
|
542
556
|
/**
|
|
@@ -548,6 +562,13 @@ export declare type ParamsObject = {
|
|
|
548
562
|
* Включать capability c аудио шарой
|
|
549
563
|
*/
|
|
550
564
|
audioShareCapabilityEnabled: boolean;
|
|
565
|
+
/**
|
|
566
|
+
* Изменился список ролей, которым доступны ConversationFeatures
|
|
567
|
+
*
|
|
568
|
+
* @param featuresPerRole Объект вида ключ: ConversationFeature = значение: UserRole[]
|
|
569
|
+
* (если ключ фичи отсутствует, или в ролях пустой массив, считаем фичу доступной для всех пользователей)
|
|
570
|
+
*/
|
|
571
|
+
onFeaturesPerRoleChanged?: (featuresPerRole: IFeaturesPerRole) => void;
|
|
551
572
|
};
|
|
552
573
|
export default abstract class Params {
|
|
553
574
|
private static _params;
|
|
@@ -651,4 +672,5 @@ export default abstract class Params {
|
|
|
651
672
|
static get muteMode(): boolean;
|
|
652
673
|
static get preserveAudioTracks(): boolean;
|
|
653
674
|
static get audioShareCapabilityEnabled(): boolean;
|
|
675
|
+
static get screenShareCongestionControl(): boolean;
|
|
654
676
|
}
|
package/types/Asr.d.ts
ADDED
package/types/MovieShare.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import LiveStatus from '../enums/LiveStatus';
|
|
1
2
|
import { OkUserId, CompositeUserId } from './Participant';
|
|
2
3
|
import { MediaType } from './ParticipantStreamDescription';
|
|
3
4
|
export interface IMoviePreview {
|
|
@@ -18,7 +19,8 @@ export declare type ISharedMovieStateResponse = [
|
|
|
18
19
|
number,
|
|
19
20
|
boolean,
|
|
20
21
|
number,
|
|
21
|
-
boolean
|
|
22
|
+
boolean,
|
|
23
|
+
number
|
|
22
24
|
];
|
|
23
25
|
export interface ISharedMovieState {
|
|
24
26
|
participantId: CompositeUserId;
|
|
@@ -26,6 +28,7 @@ export interface ISharedMovieState {
|
|
|
26
28
|
pause?: boolean;
|
|
27
29
|
offset?: number;
|
|
28
30
|
mute?: boolean;
|
|
31
|
+
liveStatus?: LiveStatus;
|
|
29
32
|
}
|
|
30
33
|
export interface IUpdateMovieData {
|
|
31
34
|
movieId: string;
|
package/types/Participant.d.ts
CHANGED
package/types/Room.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ExternalParticipantId, ExternalParticipantListChunk } from './ExternalId';
|
|
2
|
-
import {
|
|
1
|
+
import { ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk } from './ExternalId';
|
|
2
|
+
import { ParticipantListMarkers } from './Participant';
|
|
3
3
|
export interface Room {
|
|
4
4
|
id: number;
|
|
5
5
|
/**
|
|
@@ -33,9 +33,20 @@ export interface Room {
|
|
|
33
33
|
*/
|
|
34
34
|
active?: boolean;
|
|
35
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Initial rooms state
|
|
38
|
+
*/
|
|
39
|
+
export interface Rooms {
|
|
40
|
+
rooms: Room[];
|
|
41
|
+
/**
|
|
42
|
+
* current room id of participant. if null then the partipant is in the main call
|
|
43
|
+
*/
|
|
44
|
+
roomId?: number;
|
|
45
|
+
}
|
|
36
46
|
export interface RoomsUpdate {
|
|
37
47
|
rooms?: Room[];
|
|
38
48
|
roomIds?: number[];
|
|
49
|
+
deactivated?: boolean;
|
|
39
50
|
}
|
|
40
51
|
export interface RoomParticipantUpdate {
|
|
41
52
|
roomId: number;
|
|
@@ -51,10 +62,11 @@ export interface RoomParticipantUpdate {
|
|
|
51
62
|
/**
|
|
52
63
|
* optional, data for added participants
|
|
53
64
|
*/
|
|
54
|
-
addedParticipants?:
|
|
65
|
+
addedParticipants?: ExternalParticipant[];
|
|
55
66
|
/**
|
|
56
67
|
* optional, depending on the context may contain either markers
|
|
57
68
|
* for all (sorted) lists available or be empty (if client fails to support chunked participants)
|
|
58
69
|
*/
|
|
59
|
-
removedParticipantMarkers?: ParticipantListMarkers;
|
|
70
|
+
removedParticipantMarkers?: ParticipantListMarkers[];
|
|
71
|
+
removedParticipantIds?: ExternalParticipantId[];
|
|
60
72
|
}
|