@vkontakte/calls-sdk 2.6.2-dev.57d3082.0 → 2.6.2-dev.596c19c.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/abstract/BaseSignaling.d.ts +3 -1
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +0 -2
- package/classes/ParticipantIdRegistry.d.ts +2 -0
- package/classes/ProducerCommandSerializationService.d.ts +17 -0
- package/classes/screenshare/ScreenCaptureSender.d.ts +1 -0
- package/classes/screenshare/Utils.d.ts +1 -0
- package/default/Signaling.d.ts +9 -2
- package/package.json +1 -1
- package/static/ApiTransport.d.ts +1 -1
- package/static/Params.d.ts +9 -0
- package/static/Utils.d.ts +3 -0
- package/types/LayoutUtils.d.ts +5 -0
- package/types/ParticipantLayout.d.ts +7 -1
- package/utils/MsgPackerBufferUtils.d.ts +31 -0
|
@@ -203,8 +203,6 @@ export default class Conversation extends EventEmitter {
|
|
|
203
203
|
private _stopStreaming;
|
|
204
204
|
private _sendUpdateDisplayLayout;
|
|
205
205
|
private _cleanupCooldownQueue;
|
|
206
|
-
private static _isStopStreaming;
|
|
207
|
-
private static _layoutToString;
|
|
208
206
|
private _onParticipantSourcesUpdate;
|
|
209
207
|
private _onParticipantPromoted;
|
|
210
208
|
private _onChatRoomUpdated;
|
|
@@ -2,7 +2,9 @@ import { ParticipantStreamDescription } from '../types/ParticipantStreamDescript
|
|
|
2
2
|
import SignalingMessage from '../types/SignalingMessage';
|
|
3
3
|
export declare class ParticipantIdRegistry {
|
|
4
4
|
private streamDescriptionByCompactId;
|
|
5
|
+
private compactIdByStreamDescription;
|
|
5
6
|
getStreamDescription(compactedId: number): ParticipantStreamDescription | undefined;
|
|
7
|
+
getCompactId(streamDescription: string): number | undefined;
|
|
6
8
|
handleMessage(data: ArrayBuffer): SignalingMessage | null;
|
|
7
9
|
private _createParticipantSourcesUpdateNotification;
|
|
8
10
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import ParticipantLayout, { RequestKeyFrame, StopStream } from '../types/ParticipantLayout';
|
|
2
|
+
import SignalingMessage from '../types/SignalingMessage';
|
|
3
|
+
import { ParticipantIdRegistry } from './ParticipantIdRegistry';
|
|
4
|
+
import { PerfStatReport } from './transport/PerfStatReporter';
|
|
5
|
+
export declare class ProducerCommandSerializationService {
|
|
6
|
+
private participantIdRegistry;
|
|
7
|
+
setParticipantIdRegistry(participantIdRegistry: ParticipantIdRegistry): void;
|
|
8
|
+
serializeUpdateDisplayLayout(sequenceNumber: number, layouts: {
|
|
9
|
+
[key: string]: ParticipantLayout | StopStream | RequestKeyFrame;
|
|
10
|
+
}): ArrayBuffer;
|
|
11
|
+
private writeLayout;
|
|
12
|
+
private writeStreamDesc;
|
|
13
|
+
serializePerfStatReport(sequenceNumber: number, report: PerfStatReport): ArrayBuffer;
|
|
14
|
+
deserializeCommandResponse(data: BufferSource): SignalingMessage | undefined;
|
|
15
|
+
private deserializeUpdateDisplayLayoutResponse;
|
|
16
|
+
private deserializeReportPerfStatResponse;
|
|
17
|
+
}
|
package/default/Signaling.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ import MediaModifiers from '../types/MediaModifiers';
|
|
|
13
13
|
import MediaSettings from '../types/MediaSettings';
|
|
14
14
|
import MuteStates from '../types/MuteStates';
|
|
15
15
|
import { CompositeUserId, ParticipantId } from '../types/Participant';
|
|
16
|
+
import ParticipantLayout, { RequestKeyFrame, StopStream } from '../types/ParticipantLayout';
|
|
16
17
|
import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
|
|
17
18
|
import SignalingMessage from '../types/SignalingMessage';
|
|
18
19
|
import { WaitingParticipantId } from '../types/WaitingHall';
|
|
@@ -39,6 +40,8 @@ export default class Signaling extends BaseSignaling {
|
|
|
39
40
|
private participantIdRegistry;
|
|
40
41
|
private producerNotificationDataChannel;
|
|
41
42
|
private producerCommandDataChannel;
|
|
43
|
+
private producerCommandDataChannelEnabled;
|
|
44
|
+
private producerCommandSerializationService;
|
|
42
45
|
private static readonly RECONNECT_DELAY;
|
|
43
46
|
private static readonly RECONNECT_MAX_DELAY;
|
|
44
47
|
private static readonly RECONNECT_MAX_COUNT;
|
|
@@ -52,6 +55,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
52
55
|
setParticipantIdRegistry(participantIdRegistry: ParticipantIdRegistry): void;
|
|
53
56
|
setProducerNotificationDataChannel(dataChannel: RTCDataChannel): void;
|
|
54
57
|
setProducerCommandDataChannel(dataChannel: RTCDataChannel): void;
|
|
58
|
+
useCommandDataChannel(status: boolean): void;
|
|
55
59
|
/**
|
|
56
60
|
* Free used resources
|
|
57
61
|
*/
|
|
@@ -89,8 +93,8 @@ export default class Signaling extends BaseSignaling {
|
|
|
89
93
|
changePriorities(priorities: {
|
|
90
94
|
[key: string]: number;
|
|
91
95
|
}): Promise<SignalingMessage | void>;
|
|
92
|
-
updateDisplayLayout(
|
|
93
|
-
[
|
|
96
|
+
updateDisplayLayout(layouts: {
|
|
97
|
+
[streamDesc: string]: ParticipantLayout | StopStream | RequestKeyFrame;
|
|
94
98
|
}): Promise<SignalingMessage>;
|
|
95
99
|
addMovie(data: any): Promise<SignalingMessage>;
|
|
96
100
|
updateMovie(data: any): Promise<SignalingMessage>;
|
|
@@ -140,6 +144,9 @@ export default class Signaling extends BaseSignaling {
|
|
|
140
144
|
protected _reconnect(): void;
|
|
141
145
|
private _handleCommandResponse;
|
|
142
146
|
private _handleCommandsQueue;
|
|
147
|
+
private _serializeBinary;
|
|
148
|
+
private _serializeJson;
|
|
149
|
+
private _convertDisplayLayout;
|
|
143
150
|
protected _waitConnectionMessage(): void;
|
|
144
151
|
protected _stopWaitConnectionMessage(): void;
|
|
145
152
|
private _startDoctor;
|
package/package.json
CHANGED
package/static/ApiTransport.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare function init(): void;
|
|
2
2
|
export declare function sendBeakon(method: string, params?: {
|
|
3
3
|
[key: string]: any;
|
|
4
|
-
}, noSession?: boolean): void
|
|
4
|
+
}, noSession?: boolean): Promise<void>;
|
|
5
5
|
export declare function request(method: string, params?: {
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
}, noSession?: boolean): Promise<unknown>;
|
package/static/Params.d.ts
CHANGED
|
@@ -186,6 +186,7 @@ export declare type ParamsObject = {
|
|
|
186
186
|
* Работает только при приёме экрана через дата-канал.
|
|
187
187
|
*
|
|
188
188
|
* _По умолчанию: `true`_
|
|
189
|
+
* @deprecated
|
|
189
190
|
*/
|
|
190
191
|
producerScreenTrack: boolean;
|
|
191
192
|
/**
|
|
@@ -193,12 +194,19 @@ export declare type ParamsObject = {
|
|
|
193
194
|
* Работает только при отправке экрана через дата-канал.
|
|
194
195
|
*
|
|
195
196
|
* _По умолчанию: `true`_
|
|
197
|
+
* @deprecated
|
|
196
198
|
*/
|
|
197
199
|
consumerScreenTrack: boolean;
|
|
198
200
|
producerNotificationDataChannel: boolean;
|
|
199
201
|
producerCommandDataChannel: boolean;
|
|
200
202
|
consumerScreenDataChannel: boolean;
|
|
201
203
|
producerScreenDataChannel: boolean;
|
|
204
|
+
/**
|
|
205
|
+
* Размер пакета для отправки трансляции экрана в датаканал в байтах.
|
|
206
|
+
* Максимальный размер пакета 65536 bytes в хроме, но по стандарту лучше максимум 16 Кб.
|
|
207
|
+
* @hidden
|
|
208
|
+
*/
|
|
209
|
+
consumerScreenDataChannelPacketSize: number;
|
|
202
210
|
screenShareWebmBuilder: boolean;
|
|
203
211
|
noiseSuppression: boolean;
|
|
204
212
|
/**
|
|
@@ -544,6 +552,7 @@ export default abstract class Params {
|
|
|
544
552
|
static get producerCommandDataChannel(): boolean;
|
|
545
553
|
static get consumerScreenDataChannel(): boolean;
|
|
546
554
|
static get producerScreenDataChannel(): boolean;
|
|
555
|
+
static get consumerScreenDataChannelPacketSize(): number;
|
|
547
556
|
static get screenShareWebmBuilder(): boolean;
|
|
548
557
|
static get noiseSuppression(): boolean;
|
|
549
558
|
static set noiseSuppression(value: boolean);
|
package/static/Utils.d.ts
CHANGED
|
@@ -60,5 +60,8 @@ declare namespace Utils {
|
|
|
60
60
|
* https://stash.odkl.ru/projects/ODKL/repos/odnoklassniki-webrtc/browse/src/main/java/one/webrtc/domain/conversation/ParticipantIndex.java#67-78
|
|
61
61
|
*/
|
|
62
62
|
function participantMarkerCompare(marker1: ExternalParticipantListMarker | undefined, marker2: ExternalParticipantListMarker | undefined): number;
|
|
63
|
+
/** убирает все ключи со значением `V` на 1 уровне */
|
|
64
|
+
function objectFilterOutValues<T extends Record<string, V>, V = unknown>(obj: T, value?: V | V[]): Partial<T>;
|
|
65
|
+
function setImmediate(fn: () => void): () => void;
|
|
63
66
|
}
|
|
64
67
|
export default Utils;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Layout, RequestKeyFrame, StopStream } from './ParticipantLayout';
|
|
2
|
+
export declare const REQUEST_KEY_FRAME_CODE = "kf";
|
|
3
|
+
export declare function isStopStreaming(layout: Layout | StopStream | RequestKeyFrame): layout is StopStream;
|
|
4
|
+
export declare function isRequestKeyFrame(layout: Layout | StopStream | RequestKeyFrame): layout is RequestKeyFrame;
|
|
5
|
+
export declare function layoutToString(layout: Layout | StopStream | RequestKeyFrame): string;
|
|
@@ -31,10 +31,16 @@ export declare type StopStream = {
|
|
|
31
31
|
*/
|
|
32
32
|
stopStream: true;
|
|
33
33
|
};
|
|
34
|
+
/**
|
|
35
|
+
* Request key frame from source. Should not be called often, negatively impacts video quality.
|
|
36
|
+
*/
|
|
37
|
+
export declare type RequestKeyFrame = {
|
|
38
|
+
keyFrameRequested: true;
|
|
39
|
+
};
|
|
34
40
|
/**
|
|
35
41
|
* Лейаут собеседника в звонке
|
|
36
42
|
*/
|
|
37
|
-
export declare type ParticipantLayout = (Layout | StopStream) & {
|
|
43
|
+
export declare type ParticipantLayout = (Layout | StopStream | RequestKeyFrame) & {
|
|
38
44
|
/**
|
|
39
45
|
* Внешний ID пользователя
|
|
40
46
|
*/
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fork from messagepack internals.
|
|
3
|
+
* Package messagepack doesn't export createWriteBuffer and createReadBuffer methods.
|
|
4
|
+
*/
|
|
5
|
+
export declare function createWriteBuffer(): {
|
|
6
|
+
put(v: BufferSource): void;
|
|
7
|
+
putI8(v: number): void;
|
|
8
|
+
putI16(v: number): void;
|
|
9
|
+
putI32(v: number): void;
|
|
10
|
+
putI64(v: number): void;
|
|
11
|
+
putUi8(v: number): void;
|
|
12
|
+
putUi16(v: number): void;
|
|
13
|
+
putUi32(v: number): void;
|
|
14
|
+
putUi64(v: number): void;
|
|
15
|
+
putF(v: number): void;
|
|
16
|
+
ui8array(): Uint8Array;
|
|
17
|
+
};
|
|
18
|
+
export declare function createReadBuffer(buf: BufferSource): {
|
|
19
|
+
peek(): number;
|
|
20
|
+
get(len: number): ArrayBuffer;
|
|
21
|
+
getI8(): number;
|
|
22
|
+
getI16(): number;
|
|
23
|
+
getI32(): number;
|
|
24
|
+
getI64(): number;
|
|
25
|
+
getUi8(): number;
|
|
26
|
+
getUi16(): number;
|
|
27
|
+
getUi32(): number;
|
|
28
|
+
getUi64(): number;
|
|
29
|
+
getF32(): number;
|
|
30
|
+
getF64(): number;
|
|
31
|
+
};
|