@vkontakte/calls-sdk 2.6.2-dev.0c3e1d9.0 → 2.6.2-dev.0d61671.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 +8 -4
- package/abstract/BaseSignaling.d.ts +6 -3
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +6 -4
- 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 +12 -4
- package/enums/SignalingNotification.d.ts +5 -1
- package/package.json +1 -1
- package/static/ApiTransport.d.ts +1 -1
- package/static/External.d.ts +60 -3
- package/static/Params.d.ts +44 -1
- package/static/Utils.d.ts +2 -0
- package/types/ExternalId.d.ts +2 -0
- package/types/LayoutUtils.d.ts +5 -0
- package/types/MediaSettings.d.ts +1 -1
- package/types/MovieShare.d.ts +32 -0
- package/types/Participant.d.ts +2 -0
- package/types/ParticipantLayout.d.ts +7 -1
- package/types/SignalingMessage.d.ts +10 -2
- package/utils/MsgPackerBufferUtils.d.ts +31 -0
|
@@ -15,6 +15,7 @@ import { JSONObject } from '../static/Json';
|
|
|
15
15
|
import { ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalUserId } from '../types/ExternalId';
|
|
16
16
|
import MediaModifiers from '../types/MediaModifiers';
|
|
17
17
|
import { IVideoDimentions } from '../types/MediaSettings';
|
|
18
|
+
import { IAddMovieParams } from '../types/MovieShare';
|
|
18
19
|
import MuteStates from '../types/MuteStates';
|
|
19
20
|
import { CompositeUserId, IGetParticipantsParameters, OkUserId, ParticipantId } from '../types/Participant';
|
|
20
21
|
import { ParticipantLayout } from '../types/ParticipantLayout';
|
|
@@ -203,11 +204,12 @@ export default class Conversation extends EventEmitter {
|
|
|
203
204
|
private _stopStreaming;
|
|
204
205
|
private _sendUpdateDisplayLayout;
|
|
205
206
|
private _cleanupCooldownQueue;
|
|
206
|
-
private static _isStopStreaming;
|
|
207
|
-
private static _layoutToString;
|
|
208
207
|
private _onParticipantSourcesUpdate;
|
|
209
208
|
private _onParticipantPromoted;
|
|
210
209
|
private _onChatRoomUpdated;
|
|
210
|
+
private _onSharedMovieUpdate;
|
|
211
|
+
private _onSharedMovieInfoStarted;
|
|
212
|
+
private _onSharedMovieInfoStopped;
|
|
211
213
|
private _waitForStreamIfNeeded;
|
|
212
214
|
private _matchStreamDescription;
|
|
213
215
|
private _getWaitingTime;
|
|
@@ -231,11 +233,11 @@ export default class Conversation extends EventEmitter {
|
|
|
231
233
|
customData(data: JSONObject, participantId?: ParticipantId | null): Promise<void>;
|
|
232
234
|
createJoinLink(): Promise<string>;
|
|
233
235
|
removeJoinLink(): Promise<never>;
|
|
234
|
-
addMovie(movieId:
|
|
236
|
+
addMovie({ movieId, gain }: IAddMovieParams): Promise<{
|
|
235
237
|
movieId: string;
|
|
236
238
|
streamType: string;
|
|
237
239
|
}>;
|
|
238
|
-
updateMovie(movieId: string, gain?: number, offset?:
|
|
240
|
+
updateMovie(movieId: string, gain?: number, offset?: number, pause?: boolean): Promise<void>;
|
|
239
241
|
removeMovie(movieId: string): Promise<void>;
|
|
240
242
|
startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null): Promise<SignalingMessage>;
|
|
241
243
|
stopStream(): Promise<SignalingMessage>;
|
|
@@ -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
|
@@ -11,8 +11,10 @@ import UserRole from '../enums/UserRole';
|
|
|
11
11
|
import { JSONObject } from '../static/Json';
|
|
12
12
|
import MediaModifiers from '../types/MediaModifiers';
|
|
13
13
|
import MediaSettings from '../types/MediaSettings';
|
|
14
|
+
import { IAddMovieParams, ISharedMovieState } from '../types/MovieShare';
|
|
14
15
|
import MuteStates from '../types/MuteStates';
|
|
15
16
|
import { CompositeUserId, ParticipantId } from '../types/Participant';
|
|
17
|
+
import ParticipantLayout, { RequestKeyFrame, StopStream } from '../types/ParticipantLayout';
|
|
16
18
|
import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
|
|
17
19
|
import SignalingMessage from '../types/SignalingMessage';
|
|
18
20
|
import { WaitingParticipantId } from '../types/WaitingHall';
|
|
@@ -39,6 +41,8 @@ export default class Signaling extends BaseSignaling {
|
|
|
39
41
|
private participantIdRegistry;
|
|
40
42
|
private producerNotificationDataChannel;
|
|
41
43
|
private producerCommandDataChannel;
|
|
44
|
+
private producerCommandDataChannelEnabled;
|
|
45
|
+
private producerCommandSerializationService;
|
|
42
46
|
private static readonly RECONNECT_DELAY;
|
|
43
47
|
private static readonly RECONNECT_MAX_DELAY;
|
|
44
48
|
private static readonly RECONNECT_MAX_COUNT;
|
|
@@ -52,6 +56,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
52
56
|
setParticipantIdRegistry(participantIdRegistry: ParticipantIdRegistry): void;
|
|
53
57
|
setProducerNotificationDataChannel(dataChannel: RTCDataChannel): void;
|
|
54
58
|
setProducerCommandDataChannel(dataChannel: RTCDataChannel): void;
|
|
59
|
+
useCommandDataChannel(status: boolean): void;
|
|
55
60
|
/**
|
|
56
61
|
* Free used resources
|
|
57
62
|
*/
|
|
@@ -89,11 +94,11 @@ export default class Signaling extends BaseSignaling {
|
|
|
89
94
|
changePriorities(priorities: {
|
|
90
95
|
[key: string]: number;
|
|
91
96
|
}): Promise<SignalingMessage | void>;
|
|
92
|
-
updateDisplayLayout(
|
|
93
|
-
[
|
|
97
|
+
updateDisplayLayout(layouts: {
|
|
98
|
+
[streamDesc: string]: ParticipantLayout | StopStream | RequestKeyFrame;
|
|
94
99
|
}): Promise<SignalingMessage>;
|
|
95
|
-
addMovie(data:
|
|
96
|
-
updateMovie(data:
|
|
100
|
+
addMovie(data: IAddMovieParams): Promise<SignalingMessage>;
|
|
101
|
+
updateMovie(data: ISharedMovieState): Promise<SignalingMessage>;
|
|
97
102
|
removeMovie(data: any): Promise<SignalingMessage>;
|
|
98
103
|
startStream(data: any): Promise<SignalingMessage>;
|
|
99
104
|
stopStream(): Promise<SignalingMessage>;
|
|
@@ -140,6 +145,9 @@ export default class Signaling extends BaseSignaling {
|
|
|
140
145
|
protected _reconnect(): void;
|
|
141
146
|
private _handleCommandResponse;
|
|
142
147
|
private _handleCommandsQueue;
|
|
148
|
+
private _serializeBinary;
|
|
149
|
+
private _serializeJson;
|
|
150
|
+
private _convertDisplayLayout;
|
|
143
151
|
protected _waitConnectionMessage(): void;
|
|
144
152
|
protected _stopWaitConnectionMessage(): void;
|
|
145
153
|
private _startDoctor;
|
|
@@ -35,6 +35,10 @@ declare enum SignalingNotification {
|
|
|
35
35
|
PROMOTE_PARTICIPANT = "promote-participant",
|
|
36
36
|
CHAT_ROOM_UPDATED = "chat-room-updated",
|
|
37
37
|
PROMOTION_APPROVED = "promotion-approved",
|
|
38
|
-
JOIN_LINK_CHANGED = "join-link-changed"
|
|
38
|
+
JOIN_LINK_CHANGED = "join-link-changed",
|
|
39
|
+
MOVIE_UPDATE_NOTIFICATION = "movie-update-notification",
|
|
40
|
+
MOVIE_SHARE_INFO = "movie-share-info",
|
|
41
|
+
MOVIE_SHARE_STARTED = "movie-share-started",
|
|
42
|
+
MOVIE_SHARE_STOPPED = "movie-share-stopped"
|
|
39
43
|
}
|
|
40
44
|
export default SignalingNotification;
|
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/External.d.ts
CHANGED
|
@@ -10,6 +10,7 @@ import UserRole from '../enums/UserRole';
|
|
|
10
10
|
import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalParticipantListMarkers } from '../types/ExternalId';
|
|
11
11
|
import MediaModifiers from '../types/MediaModifiers';
|
|
12
12
|
import MediaSettings from '../types/MediaSettings';
|
|
13
|
+
import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
|
|
13
14
|
import MuteStates from '../types/MuteStates';
|
|
14
15
|
import { ParticipantStateMapped } from '../types/Participant';
|
|
15
16
|
import { DebugMessageType } from './Debug';
|
|
@@ -76,6 +77,29 @@ declare namespace External {
|
|
|
76
77
|
* @param stream
|
|
77
78
|
*/
|
|
78
79
|
function onRemoteLive(userId: ExternalParticipantId, streamName: string, stream: MediaStream | null): void;
|
|
80
|
+
/**
|
|
81
|
+
* Получен собственный стрим лайв.
|
|
82
|
+
* Если сервер закончил стримить собеседника, вместо стрима будет передан null
|
|
83
|
+
*
|
|
84
|
+
* @param userId
|
|
85
|
+
* @param streamName
|
|
86
|
+
* @param stream
|
|
87
|
+
*/
|
|
88
|
+
function onLocalLive(userId: ExternalParticipantId, streamName: string, stream: MediaStream | null): void;
|
|
89
|
+
/**
|
|
90
|
+
* Получено обновление стрима или лайва от собеседника.
|
|
91
|
+
*
|
|
92
|
+
* @param userId
|
|
93
|
+
* @param data
|
|
94
|
+
*/
|
|
95
|
+
function onRemoteLiveUpdate(userId: ExternalParticipantId, data: ISharedMovieState): void;
|
|
96
|
+
/**
|
|
97
|
+
* Получено обновление собственного стрима или лайва.
|
|
98
|
+
*
|
|
99
|
+
* @param userId
|
|
100
|
+
* @param data
|
|
101
|
+
*/
|
|
102
|
+
function onLocalLiveUpdate(userId: ExternalParticipantId, data: ISharedMovieState): void;
|
|
79
103
|
/**
|
|
80
104
|
* Получен стрим с экрана собеседника.
|
|
81
105
|
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
@@ -106,6 +130,41 @@ declare namespace External {
|
|
|
106
130
|
* @param markers
|
|
107
131
|
*/
|
|
108
132
|
function onRemoteMediaSettings(userId: ExternalParticipantId, mediaSettings: MediaSettings, markers?: ExternalParticipantListMarkers): void;
|
|
133
|
+
/**
|
|
134
|
+
* Изменились данные собственного стрима
|
|
135
|
+
*
|
|
136
|
+
* @param userId
|
|
137
|
+
* @param mediaSettings
|
|
138
|
+
*/
|
|
139
|
+
function onLocalMediaSettings(userId: ExternalParticipantId, mediaSettings: MediaSettings): void;
|
|
140
|
+
/**
|
|
141
|
+
* Полученны данные по стримам (лайв/мувик) от собеседника
|
|
142
|
+
*
|
|
143
|
+
* @param userId
|
|
144
|
+
* @param sharedMovieInfo
|
|
145
|
+
*/
|
|
146
|
+
function onRemoteSharedMovieInfo(userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo): void;
|
|
147
|
+
/**
|
|
148
|
+
* Полученны данные по остановленным стримам (лайв/мувик) от собеседника
|
|
149
|
+
*
|
|
150
|
+
* @param userId
|
|
151
|
+
* @param sharedMovieStoppedInfo
|
|
152
|
+
*/
|
|
153
|
+
function onRemoteSharedMovieStoppedInfo(userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo): void;
|
|
154
|
+
/**
|
|
155
|
+
* Полученны данные по собственным стримам (лайв/мувик)
|
|
156
|
+
*
|
|
157
|
+
* @param userId
|
|
158
|
+
* @param sharedMovieInfo
|
|
159
|
+
*/
|
|
160
|
+
function onLocalSharedMovieInfo(userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo): void;
|
|
161
|
+
/**
|
|
162
|
+
* Полученны данные по собственным остановленным стримам (лайв/мувик)
|
|
163
|
+
*
|
|
164
|
+
* @param userId
|
|
165
|
+
* @param sharedMovieStoppedInfo
|
|
166
|
+
*/
|
|
167
|
+
function onLocalSharedMovieStoppedInfo(userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo): void;
|
|
109
168
|
/**
|
|
110
169
|
* Добавили участника
|
|
111
170
|
*
|
|
@@ -187,10 +246,8 @@ declare namespace External {
|
|
|
187
246
|
* @param unmute Разрешение включить устройство
|
|
188
247
|
* @param userId Пользователь, для которого изменились разрешения или `null` для текущего пользователя
|
|
189
248
|
* @param adminId Пользователь, который изменил разрешения
|
|
190
|
-
* @param stateUpdated Если `true`, значит глобальное/персональное состояние изменилось и поля `muteStates`/`unmuteOptions` содержат обновления, если `false`, значит, эти поля не имеют значения
|
|
191
|
-
* @param requestedMedia Какие устройства попросили влючить участника
|
|
192
249
|
*/
|
|
193
|
-
function onMuteStates(muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll?: boolean, unmute?: boolean, userId?: ExternalParticipantId | null, adminId?: ExternalParticipantId | null
|
|
250
|
+
function onMuteStates(muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll?: boolean, unmute?: boolean, userId?: ExternalParticipantId | null, adminId?: ExternalParticipantId | null): void;
|
|
194
251
|
/**
|
|
195
252
|
* Изменились роли собеседника в звонке
|
|
196
253
|
*
|
package/static/Params.d.ts
CHANGED
|
@@ -11,6 +11,7 @@ import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalPartici
|
|
|
11
11
|
import IceServer from '../types/IceServer';
|
|
12
12
|
import MediaModifiers from '../types/MediaModifiers';
|
|
13
13
|
import MediaSettings from '../types/MediaSettings';
|
|
14
|
+
import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
|
|
14
15
|
import MuteStates from '../types/MuteStates';
|
|
15
16
|
import { ParticipantStateMapped } from '../types/Participant';
|
|
16
17
|
import AuthData from './AuthData';
|
|
@@ -186,6 +187,7 @@ export declare type ParamsObject = {
|
|
|
186
187
|
* Работает только при приёме экрана через дата-канал.
|
|
187
188
|
*
|
|
188
189
|
* _По умолчанию: `true`_
|
|
190
|
+
* @deprecated
|
|
189
191
|
*/
|
|
190
192
|
producerScreenTrack: boolean;
|
|
191
193
|
/**
|
|
@@ -193,12 +195,19 @@ export declare type ParamsObject = {
|
|
|
193
195
|
* Работает только при отправке экрана через дата-канал.
|
|
194
196
|
*
|
|
195
197
|
* _По умолчанию: `true`_
|
|
198
|
+
* @deprecated
|
|
196
199
|
*/
|
|
197
200
|
consumerScreenTrack: boolean;
|
|
198
201
|
producerNotificationDataChannel: boolean;
|
|
199
202
|
producerCommandDataChannel: boolean;
|
|
200
203
|
consumerScreenDataChannel: boolean;
|
|
201
204
|
producerScreenDataChannel: boolean;
|
|
205
|
+
/**
|
|
206
|
+
* Размер пакета для отправки трансляции экрана в датаканал в байтах.
|
|
207
|
+
* Максимальный размер пакета 65536 bytes в хроме, но по стандарту лучше максимум 16 Кб.
|
|
208
|
+
* @hidden
|
|
209
|
+
*/
|
|
210
|
+
consumerScreenDataChannelPacketSize: number;
|
|
202
211
|
screenShareWebmBuilder: boolean;
|
|
203
212
|
noiseSuppression: boolean;
|
|
204
213
|
/**
|
|
@@ -293,6 +302,19 @@ export declare type ParamsObject = {
|
|
|
293
302
|
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
294
303
|
*/
|
|
295
304
|
onRemoteLive?: (userId: ExternalParticipantId, streamId: string, stream: MediaStream | null) => void;
|
|
305
|
+
/**
|
|
306
|
+
* Получен собственный стрим трансляция или мувик.
|
|
307
|
+
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
308
|
+
*/
|
|
309
|
+
onLocalLive?: (userId: ExternalParticipantId, streamId: string, stream: MediaStream | null) => void;
|
|
310
|
+
/**
|
|
311
|
+
* Получено обновление стрима или лайва от собеседника.
|
|
312
|
+
*/
|
|
313
|
+
onRemoteLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState) => void;
|
|
314
|
+
/**
|
|
315
|
+
* Получено обновление собственного стрима или лайва.
|
|
316
|
+
*/
|
|
317
|
+
onLocalLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState) => void;
|
|
296
318
|
/**
|
|
297
319
|
* Начат звонок
|
|
298
320
|
*/
|
|
@@ -305,6 +327,26 @@ export declare type ParamsObject = {
|
|
|
305
327
|
* Изменились данные стрима собеседника
|
|
306
328
|
*/
|
|
307
329
|
onRemoteMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings, markers?: ExternalParticipantListMarkers) => void;
|
|
330
|
+
/**
|
|
331
|
+
* Изменились данные стрима собеседника
|
|
332
|
+
*/
|
|
333
|
+
onLocalMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings) => void;
|
|
334
|
+
/**
|
|
335
|
+
* Полученны данные по стримам (лайв/мувик) от собеседника
|
|
336
|
+
*/
|
|
337
|
+
onRemoteSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo) => void;
|
|
338
|
+
/**
|
|
339
|
+
* Полученны данные по остановленным стримам (лайв/мувик) от собеседника
|
|
340
|
+
*/
|
|
341
|
+
onRemoteSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo) => void;
|
|
342
|
+
/**
|
|
343
|
+
* Полученны данные по собственным стримам (лайв/мувик)
|
|
344
|
+
*/
|
|
345
|
+
onLocalSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo) => void;
|
|
346
|
+
/**
|
|
347
|
+
* Полученны данные по собственным остановленным стримам (лайв/мувик)
|
|
348
|
+
*/
|
|
349
|
+
onLocalSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo) => void;
|
|
308
350
|
/**
|
|
309
351
|
* Добавили участника
|
|
310
352
|
*/
|
|
@@ -349,7 +391,7 @@ export declare type ParamsObject = {
|
|
|
349
391
|
/**
|
|
350
392
|
* Изменились состояния устройств пользователя или разрешения включать камеру/микрофон
|
|
351
393
|
*/
|
|
352
|
-
onMuteStates?: (muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll: boolean, unmute: boolean, userId: ExternalParticipantId | null, adminId: ExternalParticipantId | null
|
|
394
|
+
onMuteStates?: (muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll: boolean, unmute: boolean, userId: ExternalParticipantId | null, adminId: ExternalParticipantId | null) => void;
|
|
353
395
|
/**
|
|
354
396
|
* Изменились роли собеседника в звонке
|
|
355
397
|
*/
|
|
@@ -544,6 +586,7 @@ export default abstract class Params {
|
|
|
544
586
|
static get producerCommandDataChannel(): boolean;
|
|
545
587
|
static get consumerScreenDataChannel(): boolean;
|
|
546
588
|
static get producerScreenDataChannel(): boolean;
|
|
589
|
+
static get consumerScreenDataChannelPacketSize(): number;
|
|
547
590
|
static get screenShareWebmBuilder(): boolean;
|
|
548
591
|
static get noiseSuppression(): boolean;
|
|
549
592
|
static set noiseSuppression(value: boolean);
|
package/static/Utils.d.ts
CHANGED
|
@@ -60,5 +60,7 @@ 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>;
|
|
63
65
|
}
|
|
64
66
|
export default Utils;
|
package/types/ExternalId.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import MediaOption from '../enums/MediaOption';
|
|
2
2
|
import { ParticipantStatus } from '../static/External';
|
|
3
3
|
import MediaSettings from './MediaSettings';
|
|
4
|
+
import { ISharedMovieInfo } from './MovieShare';
|
|
4
5
|
import MuteStates from './MuteStates';
|
|
5
6
|
import { ParticipantListMarker, ParticipantListType, ParticipantStateMapped } from './Participant';
|
|
6
7
|
import SignalingMessage from './SignalingMessage';
|
|
@@ -94,6 +95,7 @@ export interface ExternalParticipant {
|
|
|
94
95
|
*/
|
|
95
96
|
unmuteOptions: MediaOption[];
|
|
96
97
|
markers?: ExternalParticipantListMarkers;
|
|
98
|
+
movieShareInfos?: ISharedMovieInfo[];
|
|
97
99
|
}
|
|
98
100
|
export interface ExternalParticipantListChunk {
|
|
99
101
|
participants: ExternalParticipant[];
|
|
@@ -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;
|
package/types/MediaSettings.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare type MediaSettings = {
|
|
|
19
19
|
export declare type VideoStreamInfo = {
|
|
20
20
|
id: string;
|
|
21
21
|
source: string;
|
|
22
|
-
|
|
22
|
+
externalMovieId?: string;
|
|
23
23
|
};
|
|
24
24
|
export default MediaSettings;
|
|
25
25
|
export declare function compareMediaSettings(ms1: MediaSettings, ms2: MediaSettings): boolean;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { OkUserId, CompositeUserId } from './Participant';
|
|
2
|
+
import { MediaType } from './ParticipantStreamDescription';
|
|
3
|
+
export interface IAddMovieParams {
|
|
4
|
+
movieId: string;
|
|
5
|
+
gain?: number;
|
|
6
|
+
}
|
|
7
|
+
export declare type ISharedMovieStateResponse = [number, number, boolean, number, number];
|
|
8
|
+
export interface ISharedMovieState {
|
|
9
|
+
participantId: CompositeUserId;
|
|
10
|
+
gain?: number;
|
|
11
|
+
pause?: boolean;
|
|
12
|
+
offset?: number;
|
|
13
|
+
duration?: number;
|
|
14
|
+
}
|
|
15
|
+
export interface ISharedMovieInfo {
|
|
16
|
+
movieId: OkUserId;
|
|
17
|
+
initiatorId: CompositeUserId;
|
|
18
|
+
title: string;
|
|
19
|
+
source: MediaType;
|
|
20
|
+
externalMovieId: string;
|
|
21
|
+
duration: number;
|
|
22
|
+
thumbnailNormal: string;
|
|
23
|
+
thumbnailMedium: string;
|
|
24
|
+
thumbnailBig: string;
|
|
25
|
+
thumbnailHigh: string;
|
|
26
|
+
thumbnailHd: string;
|
|
27
|
+
}
|
|
28
|
+
export interface ISharedMovieStoppedInfo {
|
|
29
|
+
movieId: OkUserId;
|
|
30
|
+
initiatorId: CompositeUserId;
|
|
31
|
+
source: MediaType;
|
|
32
|
+
}
|
package/types/Participant.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ import UserRole from '../enums/UserRole';
|
|
|
4
4
|
import { ParticipantStatus } from '../static/External';
|
|
5
5
|
import MediaSettings from '../types/MediaSettings';
|
|
6
6
|
import { ExternalId, ExternalParticipantId, ExternalParticipantListMarkers } from './ExternalId';
|
|
7
|
+
import { ISharedMovieInfo } from './MovieShare';
|
|
7
8
|
import MuteStates from './MuteStates';
|
|
8
9
|
import ParticipantLayout from './ParticipantLayout';
|
|
9
10
|
/**
|
|
@@ -55,6 +56,7 @@ export interface Participant {
|
|
|
55
56
|
unmuteOptions: MediaOption[];
|
|
56
57
|
observedIds: CompositeUserId[];
|
|
57
58
|
markers?: ExternalParticipantListMarkers;
|
|
59
|
+
movieShareInfos?: ISharedMovieInfo[];
|
|
58
60
|
}
|
|
59
61
|
export interface IGetParticipantsParameters {
|
|
60
62
|
externalIds: ExternalId[];
|
|
@@ -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
|
*/
|
|
@@ -9,6 +9,7 @@ import UserRole from '../enums/UserRole';
|
|
|
9
9
|
import UserType from '../enums/UserType';
|
|
10
10
|
import MediaModifiers from './MediaModifiers';
|
|
11
11
|
import MediaSettings from './MediaSettings';
|
|
12
|
+
import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from './MovieShare';
|
|
12
13
|
import MuteStates from './MuteStates';
|
|
13
14
|
import { CompositeUserId, OkUserId, ParticipantId, ParticipantListMarker as ParticipantParticipantListMarker, ParticipantListMarkers, ParticipantListType as ParticipantParticipantListType } from './Participant';
|
|
14
15
|
import VideoSettings from './VideoSettings';
|
|
@@ -54,6 +55,7 @@ declare namespace SignalingMessage {
|
|
|
54
55
|
unmuteOptions?: MediaOption[];
|
|
55
56
|
markers?: ParticipantListMarkers;
|
|
56
57
|
observedIds?: CompositeUserId[];
|
|
58
|
+
movieShareInfos?: ISharedMovieInfo[];
|
|
57
59
|
}
|
|
58
60
|
export interface ParticipantListChunk extends Notification {
|
|
59
61
|
participants: (Participant & Required<Pick<Participant, 'markers'>>)[];
|
|
@@ -148,8 +150,6 @@ declare namespace SignalingMessage {
|
|
|
148
150
|
muteStates: MuteStates;
|
|
149
151
|
unmuteOptions?: MediaOption[];
|
|
150
152
|
mediaOptions: MediaOption[];
|
|
151
|
-
requestedMedia?: MediaOption[];
|
|
152
|
-
stateUpdated?: boolean;
|
|
153
153
|
unmute?: boolean;
|
|
154
154
|
muteAll?: boolean;
|
|
155
155
|
}
|
|
@@ -279,6 +279,14 @@ declare namespace SignalingMessage {
|
|
|
279
279
|
export interface JoinLinkChanged extends Notification {
|
|
280
280
|
joinLink: string;
|
|
281
281
|
}
|
|
282
|
+
export interface SharedMovieState extends Notification {
|
|
283
|
+
data: ISharedMovieState[];
|
|
284
|
+
}
|
|
285
|
+
export interface SharedMovieInfo extends Notification {
|
|
286
|
+
movieShareInfo: ISharedMovieInfo;
|
|
287
|
+
}
|
|
288
|
+
export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
|
|
289
|
+
}
|
|
282
290
|
export {};
|
|
283
291
|
}
|
|
284
292
|
export default SignalingMessage;
|
|
@@ -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
|
+
};
|