@vkontakte/calls-sdk 2.8.2-dev.d8da99a.0 → 2.8.2-dev.dfa0c93.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 +5 -4
- package/abstract/BaseApi.d.ts +1 -1
- package/abstract/BaseSignaling.d.ts +7 -3
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +13 -10
- package/classes/FpsMeter.d.ts +10 -0
- package/classes/MediaSource.d.ts +1 -1
- package/classes/SpecListener.d.ts +0 -1
- package/classes/codec/IDecoder.d.ts +0 -1
- package/classes/codec/Types.d.ts +11 -1
- package/classes/codec/WebCodecsDecoder.d.ts +0 -1
- package/classes/screenshare/BaseRenderer.d.ts +0 -1
- package/classes/screenshare/CanvasRenderer.d.ts +2 -0
- package/classes/screenshare/PacketHistory.d.ts +2 -2
- package/classes/screenshare/ScreenCaptureSender.d.ts +12 -3
- package/classes/screenshare/ScreenCongestionControl.d.ts +1 -1
- package/classes/screenshare/StreamBuilder.d.ts +1 -0
- package/classes/screenshare/TrackGeneratorRenderer.d.ts +0 -1
- package/classes/screenshare/Utils.d.ts +1 -1
- package/classes/stat/StatAggregator.d.ts +1 -1
- package/classes/stat/StatFirstMediaReceived.d.ts +14 -2
- package/classes/transport/BaseTransport.d.ts +13 -0
- package/classes/transport/DirectTransport.d.ts +7 -18
- package/classes/transport/ServerTransport.d.ts +5 -17
- package/classes/transport/Transport.d.ts +8 -5
- package/default/Signaling.d.ts +7 -3
- package/enums/FatalError.d.ts +1 -0
- package/enums/SignalingNotification.d.ts +0 -1
- package/package.json +2 -2
- package/static/External.d.ts +13 -20
- package/static/Params.d.ts +12 -26
- package/static/Utils.d.ts +6 -2
- package/types/ExternalId.d.ts +1 -1
- package/types/{Logger.d.ts → IEventualStatLog.d.ts} +2 -2
- package/types/MovieShare.d.ts +2 -2
- package/types/Participant.d.ts +4 -3
- package/types/ParticipantListChunk.d.ts +1 -1
- package/types/ParticipantStreamDescription.d.ts +3 -2
- package/types/PerfStatReporter.d.ts +1 -1
- package/types/Room.d.ts +1 -0
- package/types/SignalingCommand.d.ts +2 -1
- package/types/SignalingMessage.d.ts +18 -4
- package/types/Statistics.d.ts +2 -2
- package/utils/ArrayDequeue.d.ts +1 -1
- package/utils/ArrayList.d.ts +5 -2
- package/utils/FastList.d.ts +5 -2
- package/utils/IList.d.ts +5 -2
|
@@ -58,7 +58,7 @@ export default class Conversation extends EventEmitter {
|
|
|
58
58
|
private readonly _onUnload;
|
|
59
59
|
private readonly _audioOutput;
|
|
60
60
|
private _lastStalled;
|
|
61
|
-
private
|
|
61
|
+
private _audioMixStalled;
|
|
62
62
|
private _audioFix;
|
|
63
63
|
private _streamByStreamId;
|
|
64
64
|
private _streamIdByStreamDescription;
|
|
@@ -129,7 +129,6 @@ export default class Conversation extends EventEmitter {
|
|
|
129
129
|
private _getExternalIdByParticipantId;
|
|
130
130
|
private _registerParticipantAndSetMarkersIfChunkEnabled;
|
|
131
131
|
private _warnParticipantNotInConversation;
|
|
132
|
-
private _setParticipantMarkers;
|
|
133
132
|
private _denormalizeMarkers;
|
|
134
133
|
/**
|
|
135
134
|
* Обрабатывает данные connection из сигналинга. Должен вызываться после `_registerParticipants`
|
|
@@ -181,7 +180,7 @@ export default class Conversation extends EventEmitter {
|
|
|
181
180
|
private _onAddParticipant;
|
|
182
181
|
private _onRemoveParticipant;
|
|
183
182
|
changeDevice(kind: MediaDeviceKind): Promise<void>;
|
|
184
|
-
stopVideoTrack(): void;
|
|
183
|
+
stopVideoTrack(): void | undefined;
|
|
185
184
|
toggleScreenCapturing(settings: ScreenCaptureSettings): Promise<void>;
|
|
186
185
|
disableScreenCapturing(): Promise<void>;
|
|
187
186
|
toggleAnimojiCapturing(state: boolean): void;
|
|
@@ -196,6 +195,9 @@ export default class Conversation extends EventEmitter {
|
|
|
196
195
|
setAudioStream(stream: MediaStream): Promise<void>;
|
|
197
196
|
toggleLocalVideo(enabled: boolean): Promise<void>;
|
|
198
197
|
toggleLocalAudio(enabled: boolean): Promise<void>;
|
|
198
|
+
/**
|
|
199
|
+
* @deprecated Use updateDisplayLayout instead
|
|
200
|
+
*/
|
|
199
201
|
changePriorities(priorities: ParticipantPriority[]): Promise<void>;
|
|
200
202
|
changeParticipantState(state: {
|
|
201
203
|
[key: string]: string;
|
|
@@ -216,6 +218,7 @@ export default class Conversation extends EventEmitter {
|
|
|
216
218
|
private _processSharedMovieInfos;
|
|
217
219
|
private _processSharedMovieInfo;
|
|
218
220
|
private _processConnectionSharedMovieInfo;
|
|
221
|
+
private _processConnectionAsrInfo;
|
|
219
222
|
private _onSharedMovieInfoStopped;
|
|
220
223
|
private _onFeaturesPerRoleChanged;
|
|
221
224
|
private _waitForStreamIfNeeded;
|
|
@@ -227,7 +230,7 @@ export default class Conversation extends EventEmitter {
|
|
|
227
230
|
startAsr(params: IAsrStartParams): Promise<void>;
|
|
228
231
|
stopAsr(params?: IAsrStopParams): Promise<void>;
|
|
229
232
|
requestAsr(request: boolean): Promise<void>;
|
|
230
|
-
muteParticipant(participantId:
|
|
233
|
+
muteParticipant(participantId: string | null | undefined, muteStates: MuteStates, requestedMedia?: MediaOption[], roomId?: number | null): Promise<void>;
|
|
231
234
|
enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<void>;
|
|
232
235
|
pinParticipant(participantId: ParticipantId, unpin: boolean, roomId?: number | null): Promise<void>;
|
|
233
236
|
updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<void>;
|
|
@@ -244,7 +247,7 @@ export default class Conversation extends EventEmitter {
|
|
|
244
247
|
chatHistory(count: number): Promise<void>;
|
|
245
248
|
customData(data: JSONObject, participantId?: ParticipantId | null): Promise<void>;
|
|
246
249
|
createJoinLink(): Promise<string>;
|
|
247
|
-
removeJoinLink(): Promise<
|
|
250
|
+
removeJoinLink(): Promise<undefined>;
|
|
248
251
|
addMovie({ movieId, gain, metadata }: IAddMovieParams): Promise<{
|
|
249
252
|
movieId: number;
|
|
250
253
|
streamType: string;
|
|
@@ -255,8 +258,8 @@ export default class Conversation extends EventEmitter {
|
|
|
255
258
|
activateRooms(roomIds: number[], deactivate: boolean): Promise<void>;
|
|
256
259
|
switchRoom(toRoomId: number | null, participantId?: ParticipantId): Promise<void>;
|
|
257
260
|
removeRooms(roomIds: number[]): Promise<void>;
|
|
258
|
-
startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null): Promise<
|
|
259
|
-
stopStream(roomId?: number | null): Promise<
|
|
261
|
+
startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null, roomId?: number | null): Promise<undefined>;
|
|
262
|
+
stopStream(roomId?: number | null): Promise<undefined>;
|
|
260
263
|
recordSetRole(participantId: ParticipantId, role: RecordRole | null, roomId?: number | null): Promise<void>;
|
|
261
264
|
getStreamInfo(): Promise<{
|
|
262
265
|
movieId: any;
|
|
@@ -265,8 +268,8 @@ export default class Conversation extends EventEmitter {
|
|
|
265
268
|
setLocalResolution({ video, effect }: {
|
|
266
269
|
video: IVideoDimentions;
|
|
267
270
|
effect?: IVideoDimentions;
|
|
268
|
-
}): Promise<void>;
|
|
269
|
-
videoEffect(effect: IEffect | null): Promise<void>;
|
|
271
|
+
}): Promise<void | undefined>;
|
|
272
|
+
videoEffect(effect: IEffect | null): Promise<void | undefined>;
|
|
270
273
|
getParticipants(parameters: IGetParticipantsParameters): Promise<ExternalParticipant[]>;
|
|
271
274
|
getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<ExternalParticipantListChunk>;
|
|
272
275
|
private _getInitialParticiapntListChunk;
|
|
@@ -332,7 +335,7 @@ export default class Conversation extends EventEmitter {
|
|
|
332
335
|
private _removeAudioTrack;
|
|
333
336
|
private _removeVideoTrack;
|
|
334
337
|
private _onTopologyChanged;
|
|
335
|
-
private
|
|
338
|
+
private _onAudioMixStall;
|
|
336
339
|
private _onRemoteSignalledStall;
|
|
337
340
|
private _onRemoteDataStats;
|
|
338
341
|
private _fixAudioDevice;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export default class FpsMeter {
|
|
2
|
+
private _counter;
|
|
3
|
+
private _interval;
|
|
4
|
+
private _lastCalculationTime;
|
|
5
|
+
private readonly _onCalculated;
|
|
6
|
+
constructor(callback?: Function | null, intervalMs?: number);
|
|
7
|
+
increment(value?: number): void;
|
|
8
|
+
calculate(): number;
|
|
9
|
+
destroy(): void;
|
|
10
|
+
}
|
package/classes/MediaSource.d.ts
CHANGED
|
@@ -40,7 +40,7 @@ export declare class MediaSource extends EventEmitter {
|
|
|
40
40
|
getStream(): MediaStream | null;
|
|
41
41
|
getScreenTrack(): MediaStreamTrack | null;
|
|
42
42
|
getSendVideoTrack(noDataChannel?: boolean): MediaStreamTrack | null;
|
|
43
|
-
|
|
43
|
+
getSendAudioTrack(): MediaStreamTrack | null;
|
|
44
44
|
get isAnimojiRequested(): boolean;
|
|
45
45
|
addTrackToPeerConnection(pc: RTCPeerConnection, observer: boolean, noDataChannel: boolean, audioRed: boolean): void;
|
|
46
46
|
getMediaSettings(): MediaSettings;
|
|
@@ -5,7 +5,6 @@ import { Transport } from './transport/Transport';
|
|
|
5
5
|
import { VolumesDetector } from './VolumesDetector';
|
|
6
6
|
export default class SpecListener extends EventEmitter {
|
|
7
7
|
private _transport;
|
|
8
|
-
private _states;
|
|
9
8
|
private _volumes;
|
|
10
9
|
private readonly _participants;
|
|
11
10
|
private _connectionTimeout;
|
package/classes/codec/Types.d.ts
CHANGED
|
@@ -11,9 +11,19 @@ export declare const enum MessageType {
|
|
|
11
11
|
DEBUG = "debug",
|
|
12
12
|
LOG_ERROR = "log_error"
|
|
13
13
|
}
|
|
14
|
-
export type EncodedVideoFrame = Pick<EncodedVideoChunk, 'type' | '
|
|
14
|
+
export type EncodedVideoFrame = Pick<EncodedVideoChunk, 'type' | 'duration' | 'byteLength' | 'data'> & {
|
|
15
15
|
width: number;
|
|
16
16
|
height: number;
|
|
17
|
+
timestamp: number;
|
|
17
18
|
};
|
|
19
|
+
export interface EncodedVideoFrameChunk {
|
|
20
|
+
sequence: number;
|
|
21
|
+
timestamp: number;
|
|
22
|
+
data: ArrayBuffer;
|
|
23
|
+
frameSize: number;
|
|
24
|
+
isFirst: boolean;
|
|
25
|
+
isLast: boolean;
|
|
26
|
+
isKey: boolean;
|
|
27
|
+
}
|
|
18
28
|
export type OnFrameCallback = (chunk: EncodedVideoFrame | null, error?: string) => void;
|
|
19
29
|
export type OnCongestionCallback = (bitrate: number, useCbr: boolean) => void;
|
|
@@ -9,6 +9,8 @@ export default class CanvasRenderer extends BaseRenderer {
|
|
|
9
9
|
private _createStream;
|
|
10
10
|
private _removeStream;
|
|
11
11
|
private _requestCanvasFrame;
|
|
12
|
+
private _drawImage;
|
|
13
|
+
drawFrame(frame: VideoFrame): Promise<void>;
|
|
12
14
|
drawImage(image: ImageData): Promise<void>;
|
|
13
15
|
destroy(): void;
|
|
14
16
|
static isBrowserSupported(): boolean;
|
|
@@ -21,8 +21,8 @@ export default class PacketHistory {
|
|
|
21
21
|
private _tail;
|
|
22
22
|
constructor(maxSize: number);
|
|
23
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;
|
|
24
|
+
update(seq: number, ts2: number): HistoryRecord | null;
|
|
25
|
+
get(seq: number): HistoryRecord | null;
|
|
26
26
|
getServerBitrateK(windowMs: number): number;
|
|
27
27
|
getCurrentDelay(): number;
|
|
28
28
|
getMaxBandwidth(): number;
|
|
@@ -13,13 +13,22 @@ export default class ScreenCaptureSender {
|
|
|
13
13
|
private _height;
|
|
14
14
|
private _feedback;
|
|
15
15
|
private _lastSharingStat;
|
|
16
|
-
private _congestionControlEnabled;
|
|
16
|
+
private readonly _congestionControlEnabled;
|
|
17
|
+
private readonly _queue;
|
|
18
|
+
private readonly _fpsMeter;
|
|
17
19
|
constructor(track: MediaStreamTrack, datachannel: RTCDataChannel, signaling: BaseSignaling, fastSharing: boolean);
|
|
20
|
+
private _handleQueue;
|
|
21
|
+
/**
|
|
22
|
+
* Очищает очередь до опорного кадра
|
|
23
|
+
* @returns Есть ли в очереди опорный кадр
|
|
24
|
+
* @hidden
|
|
25
|
+
*/
|
|
26
|
+
private _cleanupQueue;
|
|
18
27
|
private _requestFrame;
|
|
28
|
+
private _sliceFrame;
|
|
19
29
|
private _wrapHeader;
|
|
20
30
|
private _stopPacket;
|
|
21
|
-
private
|
|
22
|
-
private _sendChunk;
|
|
31
|
+
private _sendFrameChunk;
|
|
23
32
|
destroy(): void;
|
|
24
33
|
static isBrowserSupported(): boolean;
|
|
25
34
|
private _onCongestionCallback;
|
|
@@ -5,6 +5,7 @@ export default class StreamBuilder extends BaseStreamBuilder {
|
|
|
5
5
|
private readonly _decoder;
|
|
6
6
|
private _decoderReady;
|
|
7
7
|
private _decoderQueue;
|
|
8
|
+
private readonly _fpsMeter;
|
|
8
9
|
constructor(participantId: ParticipantId, onStream: IOnStream, onStat: IOnStat);
|
|
9
10
|
protected _processFrame(frame: FrameData): void;
|
|
10
11
|
private _decodeQueue;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ICallStatLog } from '../../types/PerfStatReporter';
|
|
2
|
-
import { IEventualStatLog } from '../../types/
|
|
2
|
+
import { IEventualStatLog } from '../../types/IEventualStatLog';
|
|
3
3
|
export declare class StatAggregator {
|
|
4
4
|
private static _instance;
|
|
5
5
|
private readonly _eventualLogs;
|
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
import SignalingMessage from '../../types/SignalingMessage';
|
|
2
2
|
import { TransportTopology } from '../transport/Transport';
|
|
3
|
+
/** связанный с операцией `first_media_received` тип логируемого звонка */
|
|
4
|
+
declare enum ECallType {
|
|
5
|
+
DirectOutgoing = "direct_outgoing",
|
|
6
|
+
DirectIncoming = "direct_incoming",
|
|
7
|
+
ServerIncoming = "server_incoming",
|
|
8
|
+
ServerJoinServer = "server_join_server",
|
|
9
|
+
ServerChangeTopology = "server_change_topology"
|
|
10
|
+
}
|
|
3
11
|
export declare class StatFirstMediaReceived {
|
|
4
|
-
|
|
12
|
+
/** уже поставили засечку на приём звонка */
|
|
13
|
+
protected _isCallMarked: boolean;
|
|
14
|
+
protected static _callType: ECallType | null;
|
|
5
15
|
measureSignalingConnection(connection?: SignalingMessage.Connection): void;
|
|
6
|
-
markAcceptCall(): void;
|
|
16
|
+
markAcceptCall(topology: TransportTopology): void;
|
|
7
17
|
markAcceptedCall(topology: TransportTopology): void;
|
|
18
|
+
markParticipantJoined(topology: TransportTopology): void;
|
|
8
19
|
static measure(): void;
|
|
9
20
|
}
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import BaseSignaling from '../../abstract/BaseSignaling';
|
|
2
|
+
import EventEmitter from '../EventEmitter';
|
|
3
|
+
import { MediaSource } from '../MediaSource';
|
|
4
|
+
import { TransportState } from './Transport';
|
|
5
|
+
export default abstract class BaseTransport extends EventEmitter {
|
|
6
|
+
protected readonly _signaling: BaseSignaling;
|
|
7
|
+
protected readonly _mediaSource: MediaSource;
|
|
8
|
+
protected _state: TransportState;
|
|
9
|
+
protected _pc: RTCPeerConnection | null;
|
|
10
|
+
protected constructor(signaling: BaseSignaling, mediaSource: MediaSource);
|
|
11
|
+
getState(): TransportState;
|
|
12
|
+
abstract close(error?: Error): void;
|
|
13
|
+
}
|
|
@@ -1,23 +1,17 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AnimojiReceiver, AnimojiSender } from '@vkontakte/calls-vmoji';
|
|
2
2
|
import BaseSignaling from '../../abstract/BaseSignaling';
|
|
3
3
|
import { ParticipantId } from '../../types/Participant';
|
|
4
4
|
import ServerSettings from '../../types/ServerSettings';
|
|
5
|
-
import EventEmitter from '../EventEmitter';
|
|
6
5
|
import { MediaSource } from '../MediaSource';
|
|
7
|
-
import
|
|
8
|
-
export default class DirectTransport extends
|
|
9
|
-
private readonly _signaling;
|
|
10
|
-
private readonly _mediaSource;
|
|
6
|
+
import BaseTransport from './BaseTransport';
|
|
7
|
+
export default class DirectTransport extends BaseTransport {
|
|
11
8
|
private readonly _participantId;
|
|
12
9
|
private readonly _isMaster;
|
|
13
|
-
private readonly _pc;
|
|
14
10
|
private _remoteSDP;
|
|
15
11
|
private _remoteCandidates;
|
|
16
|
-
private _state;
|
|
17
12
|
private _animojiDataChannel;
|
|
18
13
|
private _animojiReceiver;
|
|
19
14
|
private _animojiSender;
|
|
20
|
-
private _animojiSvgDataByParticipantId;
|
|
21
15
|
private _isOpen;
|
|
22
16
|
private _remotePeerId;
|
|
23
17
|
private _statInterval;
|
|
@@ -36,22 +30,22 @@ export default class DirectTransport extends EventEmitter {
|
|
|
36
30
|
private _remoteNetworkStat;
|
|
37
31
|
private _networkLimits;
|
|
38
32
|
private _perfStatReporter;
|
|
39
|
-
constructor(participantId: ParticipantId, isMaster: boolean, signaling: BaseSignaling, mediaSource: MediaSource, serverSettings: ServerSettings
|
|
40
|
-
|
|
33
|
+
constructor(participantId: ParticipantId, isMaster: boolean, signaling: BaseSignaling, mediaSource: MediaSource, serverSettings: ServerSettings);
|
|
34
|
+
get participantId(): ParticipantId;
|
|
41
35
|
updateStatisticsInterval(): void;
|
|
42
36
|
private _isDeadConnection;
|
|
43
37
|
open(peerId?: string | null): Promise<void>;
|
|
44
38
|
updateSettings(settings: ServerSettings): void;
|
|
45
39
|
preventRestart(): void;
|
|
46
40
|
allowRestart(): void;
|
|
41
|
+
setAnimojiTransport(receiver: AnimojiReceiver, sender: AnimojiSender): void;
|
|
47
42
|
close(error?: Error): void;
|
|
48
|
-
setAnimojiSvg(participantId: ParticipantId, svgData: AnimojiSvgData): void;
|
|
49
43
|
private _setState;
|
|
50
44
|
private _onSignalingNotification;
|
|
51
45
|
private _handleTransmittedData;
|
|
52
46
|
private _addIceCandidate;
|
|
53
47
|
private _setRemoteCandidates;
|
|
54
|
-
_setRemoteDescription
|
|
48
|
+
private _setRemoteDescription;
|
|
55
49
|
private _onAddTrack;
|
|
56
50
|
private _handleIceCandidate;
|
|
57
51
|
private _onSignalingStateChange;
|
|
@@ -65,7 +59,6 @@ export default class DirectTransport extends EventEmitter {
|
|
|
65
59
|
private _createAnswer;
|
|
66
60
|
private static _patchDescription;
|
|
67
61
|
private _onReplacedTrack;
|
|
68
|
-
private _onAnimojiStatus;
|
|
69
62
|
private _startStatInterval;
|
|
70
63
|
private _stopStatInterval;
|
|
71
64
|
private _checkBadNetwork;
|
|
@@ -74,8 +67,4 @@ export default class DirectTransport extends EventEmitter {
|
|
|
74
67
|
private _calcFingerprint;
|
|
75
68
|
private _applySettings;
|
|
76
69
|
private _createDataChannel;
|
|
77
|
-
private _createAnimojiReceiver;
|
|
78
|
-
private _removeAnimojiReceiver;
|
|
79
|
-
private _createAnimojiSender;
|
|
80
|
-
private _removeAnimojiSender;
|
|
81
70
|
}
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { AnimojiReceiver, AnimojiSender } from '@vkontakte/calls-vmoji';
|
|
2
2
|
import BaseSignaling from '../../abstract/BaseSignaling';
|
|
3
3
|
import { ParticipantId } from '../../types/Participant';
|
|
4
4
|
import ServerSettings from '../../types/ServerSettings';
|
|
5
|
-
import EventEmitter from '../EventEmitter';
|
|
6
5
|
import { MediaSource } from '../MediaSource';
|
|
7
|
-
import
|
|
8
|
-
export default class ServerTransport extends
|
|
9
|
-
private readonly _signaling;
|
|
10
|
-
private readonly _mediaSource;
|
|
11
|
-
private _pc;
|
|
6
|
+
import BaseTransport from './BaseTransport';
|
|
7
|
+
export default class ServerTransport extends BaseTransport {
|
|
12
8
|
private _producerNotification;
|
|
13
9
|
private _producerCommand;
|
|
14
10
|
private _producerScreen;
|
|
@@ -17,11 +13,9 @@ export default class ServerTransport extends EventEmitter {
|
|
|
17
13
|
private _animojiDataChannel;
|
|
18
14
|
private _animojiReceiver;
|
|
19
15
|
private _animojiSender;
|
|
20
|
-
private _animojiSvgDataByParticipantId;
|
|
21
16
|
private _isOpen;
|
|
22
17
|
private _observer;
|
|
23
18
|
private _reconnectionPrevented;
|
|
24
|
-
private _state;
|
|
25
19
|
private _statInterval;
|
|
26
20
|
private _settingsInterval;
|
|
27
21
|
private _statBytes;
|
|
@@ -40,8 +34,7 @@ export default class ServerTransport extends EventEmitter {
|
|
|
40
34
|
private _rtpReceiversByStreamId;
|
|
41
35
|
private _producerSessionId;
|
|
42
36
|
private _newAudioShareTrack;
|
|
43
|
-
constructor(signaling: BaseSignaling, mediaSource: MediaSource, serverSettings: ServerSettings
|
|
44
|
-
getState(): TransportState;
|
|
37
|
+
constructor(signaling: BaseSignaling, mediaSource: MediaSource, serverSettings: ServerSettings);
|
|
45
38
|
updateStatisticsInterval(): void;
|
|
46
39
|
open(observer?: boolean): void;
|
|
47
40
|
close(error?: Error): void;
|
|
@@ -49,7 +42,7 @@ export default class ServerTransport extends EventEmitter {
|
|
|
49
42
|
preventRestart(): void;
|
|
50
43
|
allowRestart(): void;
|
|
51
44
|
updateSettings(settings: ServerSettings): void;
|
|
52
|
-
|
|
45
|
+
setAnimojiTransport(receiver: AnimojiReceiver, sender: AnimojiSender): void;
|
|
53
46
|
private _closeConnection;
|
|
54
47
|
private static _closeDataChannel;
|
|
55
48
|
private _createDataChannel;
|
|
@@ -65,13 +58,8 @@ export default class ServerTransport extends EventEmitter {
|
|
|
65
58
|
private _removeCaptureSender;
|
|
66
59
|
private _createCaptureReceiver;
|
|
67
60
|
private _removeCaptureReceiver;
|
|
68
|
-
private _createAnimojiSender;
|
|
69
|
-
private _removeAnimojiSender;
|
|
70
|
-
private _createAnimojiReceiver;
|
|
71
|
-
private _removeAnimojiReceiver;
|
|
72
61
|
private _applyConsumerSettings;
|
|
73
62
|
private _onScreenSharingStatus;
|
|
74
|
-
private _onAnimojiStatus;
|
|
75
63
|
private _setState;
|
|
76
64
|
private _startStatInterval;
|
|
77
65
|
private _stopStatInterval;
|
|
@@ -8,7 +8,7 @@ export declare const enum TransportEvent {
|
|
|
8
8
|
REMOTE_TRACK_ADDED = "REMOTE_TRACK_ADDED",
|
|
9
9
|
REMOTE_TRACK_REMOVED = "REMOTE_TRACK_REMOVED",
|
|
10
10
|
REMOTE_STREAM_SECOND = "REMOTE_STREAM_SECOND",
|
|
11
|
-
|
|
11
|
+
AUDIO_MIX_STALL = "AUDIO_MIX_STALL",
|
|
12
12
|
REMOTE_DATA_STATS = "REMOTE_DATA_STATS",
|
|
13
13
|
STATE_CHANGED = "STATE_CHANGED",
|
|
14
14
|
LOCAL_STATE_CHANGED = "LOCAL_STATE_CHANGED",
|
|
@@ -48,7 +48,8 @@ export declare class Transport extends EventEmitter {
|
|
|
48
48
|
private _stListeners;
|
|
49
49
|
private _states;
|
|
50
50
|
private _localState;
|
|
51
|
-
private
|
|
51
|
+
private _animojiReceiver;
|
|
52
|
+
private _animojiSender;
|
|
52
53
|
constructor(topology: TransportTopology, signaling: BaseSignaling, mediaSource: MediaSource, serverSettings: ServerSettings);
|
|
53
54
|
updateSettings(settings: ServerSettings): void;
|
|
54
55
|
updateStatisticsInterval(): void;
|
|
@@ -60,10 +61,10 @@ export declare class Transport extends EventEmitter {
|
|
|
60
61
|
isAllocated(participantId: ParticipantId): boolean;
|
|
61
62
|
allocated(): string[];
|
|
62
63
|
opened(): string[];
|
|
63
|
-
getState(): TransportState;
|
|
64
|
+
getState(): TransportState | undefined;
|
|
65
|
+
getStates(): Record<string, TransportState>;
|
|
64
66
|
setAnimojiSvg(participantId: ParticipantId, svgData: AnimojiSvgData): void;
|
|
65
67
|
private _setStates;
|
|
66
|
-
private _setState;
|
|
67
68
|
private _setLocalState;
|
|
68
69
|
private _onSignalingNotification;
|
|
69
70
|
private _onTopologyChanged;
|
|
@@ -80,7 +81,7 @@ export declare class Transport extends EventEmitter {
|
|
|
80
81
|
private _onTransportNetworkStatus;
|
|
81
82
|
private _onRemoteStreamSecond;
|
|
82
83
|
private _onPeerConnectionClosed;
|
|
83
|
-
private
|
|
84
|
+
private _onServerAudioMixStall;
|
|
84
85
|
private _onServerRemoteDataStats;
|
|
85
86
|
private _onDirectRemoteTrackAdded;
|
|
86
87
|
private _onDirectRemoteTrackRemoved;
|
|
@@ -91,5 +92,7 @@ export declare class Transport extends EventEmitter {
|
|
|
91
92
|
private _onAnimojiStream;
|
|
92
93
|
/** Обработчик, досылающий MediaSourceEvent.SOURCE_CHANGED событие до аллокации транспортов */
|
|
93
94
|
private _onAnimojiStatus;
|
|
95
|
+
private _createAnimojiTransport;
|
|
96
|
+
private _removeAnimojiTransport;
|
|
94
97
|
getStreamWaitingTimeMs(streamId: string, targetRtpTimestamp: number): number;
|
|
95
98
|
}
|
package/default/Signaling.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import BaseSignaling, { AddParticipantParams } from '../abstract/BaseSignaling';
|
|
2
2
|
import { ParticipantIdRegistry } from '../classes/ParticipantIdRegistry';
|
|
3
3
|
import { SharingStatReport } from '../classes/screenshare/SharingStatReport';
|
|
4
|
+
import { StreamDescriptionString } from '../types/ParticipantStreamDescription';
|
|
4
5
|
import { PerfStatReport } from '../types/PerfStatReporter';
|
|
5
6
|
import { TransportTopology } from '../classes/transport/Transport';
|
|
6
7
|
import ConversationFeature from '../enums/ConversationFeature';
|
|
@@ -85,7 +86,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
85
86
|
getNextCommandSequenceNumber(): number;
|
|
86
87
|
hangup(reason: string): Promise<SignalingMessage | void>;
|
|
87
88
|
sendCandidate(participantId: ParticipantId, candidate: RTCIceCandidate): Promise<SignalingMessage>;
|
|
88
|
-
requestTestMode(consumerCommand: string, producerCommand: string): Promise<SignalingMessage>;
|
|
89
|
+
requestTestMode(consumerCommand: string, producerCommand: string | null): Promise<SignalingMessage>;
|
|
89
90
|
sendSdp(participantId: ParticipantId, sdp: RTCSessionDescription): Promise<SignalingMessage>;
|
|
90
91
|
acceptCall(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
91
92
|
changeMediaSettings(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
@@ -98,11 +99,14 @@ export default class Signaling extends BaseSignaling {
|
|
|
98
99
|
[key: string]: number | boolean | string;
|
|
99
100
|
}): Promise<SignalingMessage>;
|
|
100
101
|
acceptProducer(description: RTCSessionDescriptionInit, ssrcs: string[]): Promise<SignalingMessage>;
|
|
102
|
+
/**
|
|
103
|
+
* @deprecated Use updateDisplayLayout instead
|
|
104
|
+
*/
|
|
101
105
|
changePriorities(priorities: {
|
|
102
106
|
[key: string]: number;
|
|
103
107
|
}): Promise<SignalingMessage | void>;
|
|
104
108
|
updateDisplayLayout(layouts: {
|
|
105
|
-
[streamDesc:
|
|
109
|
+
[streamDesc: StreamDescriptionString]: ParticipantLayout | StopStream | RequestKeyFrame;
|
|
106
110
|
}): Promise<SignalingMessage>;
|
|
107
111
|
addMovie(data: IAddMovieParams): Promise<SignalingMessage>;
|
|
108
112
|
updateMovie(data: IUpdateMovieData): Promise<SignalingMessage>;
|
|
@@ -144,7 +148,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
144
148
|
* часть сообщений сигналинга. Этот метод вызывается вручную и сообщает о том,
|
|
145
149
|
* что все подписчики готовы принимать сообщения от сигналинга.
|
|
146
150
|
*/
|
|
147
|
-
readyToSend(): void;
|
|
151
|
+
readyToSend(isReady?: boolean): void;
|
|
148
152
|
getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<SignalingMessage>;
|
|
149
153
|
getParticipants(externalIds: SignalingMessage.ExternalId[]): Promise<SignalingMessage>;
|
|
150
154
|
startAsr(params: IAsrStartParams): Promise<SignalingMessage>;
|
package/enums/FatalError.d.ts
CHANGED
|
@@ -38,7 +38,6 @@ declare enum SignalingNotification {
|
|
|
38
38
|
JOIN_LINK_CHANGED = "join-link-changed",
|
|
39
39
|
FEEDBACK = "feedback",
|
|
40
40
|
MOVIE_UPDATE_NOTIFICATION = "movie-update-notification",
|
|
41
|
-
MOVIE_SHARE_INFO = "movie-share-info",
|
|
42
41
|
MOVIE_SHARE_STARTED = "movie-share-started",
|
|
43
42
|
MOVIE_SHARE_STOPPED = "movie-share-stopped",
|
|
44
43
|
ROOM_UPDATED = "room-updated",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vkontakte/calls-sdk",
|
|
3
|
-
"version": "2.8.2-dev.
|
|
3
|
+
"version": "2.8.2-dev.dfa0c93.0",
|
|
4
4
|
"author": "vk.com",
|
|
5
5
|
"description": "Library for video calls based on the vk.com platform",
|
|
6
6
|
"homepage": "https://vk.com",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"@vkontakte/calls-video-effects": "1.1.4",
|
|
18
|
-
"@vkontakte/calls-vmoji": "1.0.
|
|
18
|
+
"@vkontakte/calls-vmoji": "1.0.7-beta.3",
|
|
19
19
|
"@vkontakte/libvpx": "2.0.9",
|
|
20
20
|
"bit-buffer": "0.2.5",
|
|
21
21
|
"messagepack": "1.1.12",
|