@vkontakte/calls-sdk 2.6.2-dev.c4e9bf0.0 → 2.6.2-dev.c83d2bc.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 +6 -8
- package/abstract/BaseSignaling.d.ts +3 -3
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +8 -6
- package/classes/ProducerCommandSerializationService.d.ts +1 -1
- package/default/Api.d.ts +1 -0
- package/default/Api.test.d.ts +1 -0
- package/default/Signaling.d.ts +3 -3
- package/enums/ConversationOption.d.ts +3 -1
- package/enums/HangupType.d.ts +3 -1
- package/enums/SignalingCommandType.d.ts +2 -1
- package/enums/SignalingNotification.d.ts +1 -4
- package/package.json +1 -1
- package/static/External.d.ts +8 -60
- package/static/Params.d.ts +19 -35
- package/static/Utils.d.ts +2 -1
- package/types/Conversation.d.ts +12 -0
- package/types/ExternalId.d.ts +0 -2
- package/types/Feedback.d.ts +22 -0
- package/types/MediaSettings.d.ts +1 -1
- package/types/Participant.d.ts +0 -2
- package/types/SignalingMessage.d.ts +5 -9
- package/utils/Conversation.d.ts +2 -0
- package/types/MovieShare.d.ts +0 -32
|
@@ -15,7 +15,6 @@ 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';
|
|
19
18
|
import MuteStates from '../types/MuteStates';
|
|
20
19
|
import { CompositeUserId, IGetParticipantsParameters, OkUserId, ParticipantId } from '../types/Participant';
|
|
21
20
|
import { ParticipantLayout } from '../types/ParticipantLayout';
|
|
@@ -152,9 +151,12 @@ export default class Conversation extends EventEmitter {
|
|
|
152
151
|
private _processConnection;
|
|
153
152
|
private _prepareParticipants;
|
|
154
153
|
private _onConversationParticipantListChunk;
|
|
154
|
+
private _createParticipantListChunk;
|
|
155
155
|
private _participantListChunkToExternalChunk;
|
|
156
156
|
private _registerConnectionParticipants;
|
|
157
157
|
private _registerParticipants;
|
|
158
|
+
/** Установим состояние локальных мьютов */
|
|
159
|
+
private _registerParticipantLocalMuteState;
|
|
158
160
|
private _getClientType;
|
|
159
161
|
private _getStatusByTransportState;
|
|
160
162
|
private _registerParticipantInCache;
|
|
@@ -201,15 +203,13 @@ export default class Conversation extends EventEmitter {
|
|
|
201
203
|
requestKeyFrame(participantStreamDescription: ParticipantStreamDescription): Promise<void | SignalingMessage>;
|
|
202
204
|
requestTestMode(consumerCommand: string, producerCommand: string): Promise<void>;
|
|
203
205
|
updateDisplayLayout(layouts: ParticipantLayout[]): Promise<void>;
|
|
206
|
+
feedback(key: string): Promise<SignalingMessage>;
|
|
204
207
|
private _stopStreaming;
|
|
205
208
|
private _sendUpdateDisplayLayout;
|
|
206
209
|
private _cleanupCooldownQueue;
|
|
207
210
|
private _onParticipantSourcesUpdate;
|
|
208
211
|
private _onParticipantPromoted;
|
|
209
212
|
private _onChatRoomUpdated;
|
|
210
|
-
private _onSharedMovieUpdate;
|
|
211
|
-
private _onSharedMovieInfoStarted;
|
|
212
|
-
private _onSharedMovieInfoStopped;
|
|
213
213
|
private _waitForStreamIfNeeded;
|
|
214
214
|
private _matchStreamDescription;
|
|
215
215
|
private _getWaitingTime;
|
|
@@ -233,11 +233,11 @@ export default class Conversation extends EventEmitter {
|
|
|
233
233
|
customData(data: JSONObject, participantId?: ParticipantId | null): Promise<void>;
|
|
234
234
|
createJoinLink(): Promise<string>;
|
|
235
235
|
removeJoinLink(): Promise<never>;
|
|
236
|
-
addMovie(
|
|
236
|
+
addMovie(movieId: string): Promise<{
|
|
237
237
|
movieId: string;
|
|
238
238
|
streamType: string;
|
|
239
239
|
}>;
|
|
240
|
-
updateMovie(movieId: string, gain?: number, offset?:
|
|
240
|
+
updateMovie(movieId: string, gain?: number, offset?: string, pause?: boolean): Promise<void>;
|
|
241
241
|
removeMovie(movieId: string): Promise<void>;
|
|
242
242
|
startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null): Promise<SignalingMessage>;
|
|
243
243
|
stopStream(): Promise<SignalingMessage>;
|
|
@@ -309,6 +309,8 @@ export default class Conversation extends EventEmitter {
|
|
|
309
309
|
private _updateDisplayLayoutFromCache;
|
|
310
310
|
private _setParticipantsStatus;
|
|
311
311
|
private _onJoinLinkChanged;
|
|
312
|
+
/** получили из сингналинга сообщение о реакции пользователей */
|
|
313
|
+
private _onFeedback;
|
|
312
314
|
}
|
|
313
315
|
export declare class UpdateDisplayLayoutError extends Error {
|
|
314
316
|
readonly participantErrors: {
|
|
@@ -11,7 +11,7 @@ export declare class ProducerCommandSerializationService {
|
|
|
11
11
|
private writeLayout;
|
|
12
12
|
private writeStreamDesc;
|
|
13
13
|
serializePerfStatReport(sequenceNumber: number, report: PerfStatReport): ArrayBuffer;
|
|
14
|
-
deserializeCommandResponse(data: BufferSource): SignalingMessage | undefined
|
|
14
|
+
deserializeCommandResponse(data: BufferSource | Blob): Promise<SignalingMessage | undefined>;
|
|
15
15
|
private deserializeUpdateDisplayLayoutResponse;
|
|
16
16
|
private deserializeReportPerfStatResponse;
|
|
17
17
|
}
|
package/default/Api.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export default class Api extends BaseApi {
|
|
|
18
18
|
joinConversation(conversationId: string, isVideo?: boolean, chatId?: string): Promise<ConversationResponse>;
|
|
19
19
|
createConversation(conversationId: string, payload?: string, requireAuthToJoin?: boolean): Promise<ConversationResponse>;
|
|
20
20
|
startConversation(conversationId: string, ids?: OkUserId[], type?: CallType, isVideo?: boolean, payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean): Promise<ConversationResponse>;
|
|
21
|
+
private _preareStartConversationData;
|
|
21
22
|
private _startConversation;
|
|
22
23
|
createJoinLink(conversationId: string): Promise<{
|
|
23
24
|
join_link: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/default/Signaling.d.ts
CHANGED
|
@@ -11,7 +11,6 @@ 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';
|
|
15
14
|
import MuteStates from '../types/MuteStates';
|
|
16
15
|
import { CompositeUserId, ParticipantId } from '../types/Participant';
|
|
17
16
|
import ParticipantLayout, { RequestKeyFrame, StopStream } from '../types/ParticipantLayout';
|
|
@@ -97,8 +96,8 @@ export default class Signaling extends BaseSignaling {
|
|
|
97
96
|
updateDisplayLayout(layouts: {
|
|
98
97
|
[streamDesc: string]: ParticipantLayout | StopStream | RequestKeyFrame;
|
|
99
98
|
}): Promise<SignalingMessage>;
|
|
100
|
-
addMovie(data:
|
|
101
|
-
updateMovie(data:
|
|
99
|
+
addMovie(data: any): Promise<SignalingMessage>;
|
|
100
|
+
updateMovie(data: any): Promise<SignalingMessage>;
|
|
102
101
|
removeMovie(data: any): Promise<SignalingMessage>;
|
|
103
102
|
startStream(data: any): Promise<SignalingMessage>;
|
|
104
103
|
stopStream(): Promise<SignalingMessage>;
|
|
@@ -119,6 +118,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
119
118
|
}): Promise<SignalingMessage>;
|
|
120
119
|
getWaitingHall(fromId?: WaitingParticipantId | null, count?: number, backward?: boolean): Promise<SignalingMessage>;
|
|
121
120
|
promoteParticipant(participantId: CompositeUserId, demote?: boolean): Promise<SignalingMessage>;
|
|
121
|
+
feedback(key: string): Promise<SignalingMessage>;
|
|
122
122
|
/**
|
|
123
123
|
* Close a connection with a signaling server
|
|
124
124
|
*/
|
|
@@ -4,7 +4,9 @@
|
|
|
4
4
|
declare enum ConversationOption {
|
|
5
5
|
REQUIRE_AUTH_TO_JOIN = "REQUIRE_AUTH_TO_JOIN",
|
|
6
6
|
AUDIENCE_MODE = "AUDIENCE_MODE",
|
|
7
|
-
WAITING_HALL = "WAITING_HALL"
|
|
7
|
+
WAITING_HALL = "WAITING_HALL",
|
|
8
|
+
ASR = "ASR",
|
|
9
|
+
FEEDBACK = "FEEDBACK"
|
|
8
10
|
}
|
|
9
11
|
export default ConversationOption;
|
|
10
12
|
export declare function compareOptions(oldOptions: ConversationOption[], newOptions: ConversationOption[]): boolean;
|
package/enums/HangupType.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ declare enum HangupType {
|
|
|
16
16
|
CALLER_IS_BLOCKED = "CALLER_IS_BLOCKED",
|
|
17
17
|
NOT_FRIENDS = "NOT_FRIENDS",
|
|
18
18
|
CALLEE_IS_OFFLINE = "CALLEE_IS_OFFLINE",
|
|
19
|
+
CALLER_IS_REJECTED = "CALLER_IS_REJECTED",
|
|
19
20
|
UNKNOWN_ERROR = "UNKNOWN_ERROR",
|
|
20
21
|
UNSUPPORTED = "UNSUPPORTED",
|
|
21
22
|
OLD_VERSION = "OLD_VERSION",
|
|
@@ -23,6 +24,7 @@ declare enum HangupType {
|
|
|
23
24
|
EXTERNAL_API_ERROR = "EXTERNAL_API_ERROR",
|
|
24
25
|
SOCKET_CLOSED = "SOCKET_CLOSED",
|
|
25
26
|
ENDED = "ENDED",
|
|
26
|
-
KILLED_WITHOUT_DELETE = "KILLED_WITHOUT_DELETE"
|
|
27
|
+
KILLED_WITHOUT_DELETE = "KILLED_WITHOUT_DELETE",
|
|
28
|
+
ANOTHER_DEVICE = "ANOTHER_DEVICE"
|
|
27
29
|
}
|
|
28
30
|
export default HangupType;
|
|
@@ -34,6 +34,7 @@ declare enum SignalingCommandType {
|
|
|
34
34
|
REQUEST_TEST_MODE = "request-test-mode",
|
|
35
35
|
ADD_MOVIE = "add-movie",
|
|
36
36
|
UPDATE_MOVIE = "update-movie",
|
|
37
|
-
REMOVE_MOVIE = "remove-movie"
|
|
37
|
+
REMOVE_MOVIE = "remove-movie",
|
|
38
|
+
FEEDBACK = "feedback"
|
|
38
39
|
}
|
|
39
40
|
export default SignalingCommandType;
|
|
@@ -36,9 +36,6 @@ declare enum SignalingNotification {
|
|
|
36
36
|
CHAT_ROOM_UPDATED = "chat-room-updated",
|
|
37
37
|
PROMOTION_APPROVED = "promotion-approved",
|
|
38
38
|
JOIN_LINK_CHANGED = "join-link-changed",
|
|
39
|
-
|
|
40
|
-
MOVIE_SHARE_INFO = "movie-share-info",
|
|
41
|
-
MOVIE_SHARE_STARTED = "movie-share-started",
|
|
42
|
-
MOVIE_SHARE_STOPPED = "movie-share-stopped"
|
|
39
|
+
FEEDBACK = "feedback"
|
|
43
40
|
}
|
|
44
41
|
export default SignalingNotification;
|
package/package.json
CHANGED
package/static/External.d.ts
CHANGED
|
@@ -8,9 +8,9 @@ import FatalError from '../enums/FatalError';
|
|
|
8
8
|
import MediaOption from '../enums/MediaOption';
|
|
9
9
|
import UserRole from '../enums/UserRole';
|
|
10
10
|
import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalParticipantListMarkers } from '../types/ExternalId';
|
|
11
|
+
import { IFeedbackExternal } from '../types/Feedback';
|
|
11
12
|
import MediaModifiers from '../types/MediaModifiers';
|
|
12
13
|
import MediaSettings from '../types/MediaSettings';
|
|
13
|
-
import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
|
|
14
14
|
import MuteStates from '../types/MuteStates';
|
|
15
15
|
import { ParticipantStateMapped } from '../types/Participant';
|
|
16
16
|
import { DebugMessageType } from './Debug';
|
|
@@ -77,29 +77,6 @@ declare namespace External {
|
|
|
77
77
|
* @param stream
|
|
78
78
|
*/
|
|
79
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;
|
|
103
80
|
/**
|
|
104
81
|
* Получен стрим с экрана собеседника.
|
|
105
82
|
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
@@ -130,41 +107,6 @@ declare namespace External {
|
|
|
130
107
|
* @param markers
|
|
131
108
|
*/
|
|
132
109
|
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;
|
|
168
110
|
/**
|
|
169
111
|
* Добавили участника
|
|
170
112
|
*
|
|
@@ -246,8 +188,10 @@ declare namespace External {
|
|
|
246
188
|
* @param unmute Разрешение включить устройство
|
|
247
189
|
* @param userId Пользователь, для которого изменились разрешения или `null` для текущего пользователя
|
|
248
190
|
* @param adminId Пользователь, который изменил разрешения
|
|
191
|
+
* @param stateUpdated Если `true`, значит глобальное/персональное состояние изменилось и поля `muteStates`/`unmuteOptions` содержат обновления, если `false`, значит, эти поля не имеют значения
|
|
192
|
+
* @param requestedMedia Какие устройства попросили влючить участника
|
|
249
193
|
*/
|
|
250
|
-
function onMuteStates(muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll?: boolean, unmute?: boolean, userId?: ExternalParticipantId | null, adminId?: ExternalParticipantId | null): void;
|
|
194
|
+
function onMuteStates(muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll?: boolean, unmute?: boolean, userId?: ExternalParticipantId | null, adminId?: ExternalParticipantId | null, stateUpdated?: boolean, requestedMedia?: MediaOption[]): void;
|
|
251
195
|
/**
|
|
252
196
|
* Изменились роли собеседника в звонке
|
|
253
197
|
*
|
|
@@ -412,5 +356,9 @@ declare namespace External {
|
|
|
412
356
|
* @param joinLink токен присоединения к звонку
|
|
413
357
|
*/
|
|
414
358
|
function onJoinLinkChanged(joinLink: string): void;
|
|
359
|
+
/**
|
|
360
|
+
* Получена новая реакция
|
|
361
|
+
*/
|
|
362
|
+
function onFeedback(feedback: IFeedbackExternal[]): void;
|
|
415
363
|
}
|
|
416
364
|
export default External;
|
package/static/Params.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ import FatalError from '../enums/FatalError';
|
|
|
8
8
|
import MediaOption from '../enums/MediaOption';
|
|
9
9
|
import UserRole from '../enums/UserRole';
|
|
10
10
|
import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalParticipantListMarkers } from '../types/ExternalId';
|
|
11
|
+
import { IFeedbackExternal } from '../types/Feedback';
|
|
11
12
|
import IceServer from '../types/IceServer';
|
|
12
13
|
import MediaModifiers from '../types/MediaModifiers';
|
|
13
14
|
import MediaSettings from '../types/MediaSettings';
|
|
14
|
-
import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
|
|
15
15
|
import MuteStates from '../types/MuteStates';
|
|
16
16
|
import { ParticipantStateMapped } from '../types/Participant';
|
|
17
17
|
import AuthData from './AuthData';
|
|
@@ -44,6 +44,11 @@ export declare type ParamsObject = {
|
|
|
44
44
|
* Домен, чтобы попасть в тестовую группу. Для тестирования экспериментальных улучшений существуют отдельные сервера, чтобы собирать фидбек и уже потом раскатывать на всех юзеров. Если передать сюда специальный ключ, то конверсейшн будет обрабатываться на таком сервере.
|
|
45
45
|
*/
|
|
46
46
|
domain: string;
|
|
47
|
+
/**
|
|
48
|
+
* Домен, куда будет ходить Ok api за данными
|
|
49
|
+
* @hidden
|
|
50
|
+
*/
|
|
51
|
+
externalDomain: string;
|
|
47
52
|
iceServers: IceServer[];
|
|
48
53
|
wssBase: string;
|
|
49
54
|
wssToken: string;
|
|
@@ -248,6 +253,11 @@ export declare type ParamsObject = {
|
|
|
248
253
|
* Включать RED-extension (redundancy) для p2p звонков
|
|
249
254
|
*/
|
|
250
255
|
p2pAudioRed: boolean;
|
|
256
|
+
/**
|
|
257
|
+
* Добавлять флаг spsPpsIdrInKeyframe для h264 кодека. В результате ключевые фреймы без sps и pps
|
|
258
|
+
* не используются как ключевые. Решает проблему с артефактами на видео в случае потерь пакетов.
|
|
259
|
+
*/
|
|
260
|
+
h264spsPpsIdrInKeyframe: boolean;
|
|
251
261
|
/**
|
|
252
262
|
* Получать список участников звонка третьим аргументом в `onConversation`
|
|
253
263
|
* @hidden
|
|
@@ -302,19 +312,6 @@ export declare type ParamsObject = {
|
|
|
302
312
|
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
303
313
|
*/
|
|
304
314
|
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;
|
|
318
315
|
/**
|
|
319
316
|
* Начат звонок
|
|
320
317
|
*/
|
|
@@ -327,26 +324,6 @@ export declare type ParamsObject = {
|
|
|
327
324
|
* Изменились данные стрима собеседника
|
|
328
325
|
*/
|
|
329
326
|
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;
|
|
350
327
|
/**
|
|
351
328
|
* Добавили участника
|
|
352
329
|
*/
|
|
@@ -391,7 +368,7 @@ export declare type ParamsObject = {
|
|
|
391
368
|
/**
|
|
392
369
|
* Изменились состояния устройств пользователя или разрешения включать камеру/микрофон
|
|
393
370
|
*/
|
|
394
|
-
onMuteStates?: (muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll: boolean, unmute: boolean, userId: ExternalParticipantId | null, adminId: ExternalParticipantId | null) => void;
|
|
371
|
+
onMuteStates?: (muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll: boolean, unmute: boolean, userId: ExternalParticipantId | null, adminId: ExternalParticipantId | null, stateUpdated?: boolean, requestedMedia?: MediaOption[]) => void;
|
|
395
372
|
/**
|
|
396
373
|
* Изменились роли собеседника в звонке
|
|
397
374
|
*/
|
|
@@ -512,6 +489,11 @@ export declare type ParamsObject = {
|
|
|
512
489
|
* @param joinLink токен присоединения к звонку
|
|
513
490
|
*/
|
|
514
491
|
onJoinLinkChanged?: (joinLink: string) => void;
|
|
492
|
+
/**
|
|
493
|
+
* Получены новые реакции в звонке
|
|
494
|
+
* @param feedback массив с реакциями
|
|
495
|
+
*/
|
|
496
|
+
onFeedback?: (feedback: IFeedbackExternal[]) => void;
|
|
515
497
|
};
|
|
516
498
|
export default abstract class Params {
|
|
517
499
|
private static _params;
|
|
@@ -537,6 +519,7 @@ export default abstract class Params {
|
|
|
537
519
|
static get anonymToken(): string;
|
|
538
520
|
static set anonymToken(value: string);
|
|
539
521
|
static get domain(): string;
|
|
522
|
+
static get externalDomain(): string;
|
|
540
523
|
static get iceServers(): IceServer[];
|
|
541
524
|
static set iceServers(value: IceServer[]);
|
|
542
525
|
static get wssBase(): string;
|
|
@@ -605,6 +588,7 @@ export default abstract class Params {
|
|
|
605
588
|
static get participantListChunkInitCount(): number;
|
|
606
589
|
static get serverAudioRed(): boolean;
|
|
607
590
|
static get p2pAudioRed(): boolean;
|
|
591
|
+
static get h264spsPpsIdrInKeyframe(): boolean;
|
|
608
592
|
static get batchParticipantsOnStart(): boolean;
|
|
609
593
|
static get filterObservers(): boolean;
|
|
610
594
|
static get muteMode(): boolean;
|
package/static/Utils.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ import VideoSettings from '../types/VideoSettings';
|
|
|
6
6
|
export declare const PARAMETERS_SEPARATOR = ":";
|
|
7
7
|
export declare const DEVICE_IDX_PARAMETER = "d";
|
|
8
8
|
declare namespace Utils {
|
|
9
|
-
function patchSDP(sdp: string, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, isAudioNack?: boolean, preferRed?: boolean): string;
|
|
9
|
+
function patchSDP(sdp: string, preferH264: boolean, brokenH264: boolean, preferVP9: boolean, h264spsPpsIdrInKeyframe: boolean, isAudioNack?: boolean, preferRed?: boolean): string;
|
|
10
10
|
function getPeerIdString(peerId: SignalingMessage.PeerId): string;
|
|
11
11
|
function comparePeerId(peerId1: SignalingMessage.PeerId, peerId2: SignalingMessage.PeerId): boolean;
|
|
12
12
|
function getPeerConnectionHostInfo(pc: RTCPeerConnection): Promise<any>;
|
|
@@ -62,6 +62,7 @@ declare namespace Utils {
|
|
|
62
62
|
function participantMarkerCompare(marker1: ExternalParticipantListMarker | undefined, marker2: ExternalParticipantListMarker | undefined): number;
|
|
63
63
|
/** убирает все ключи со значением `V` на 1 уровне */
|
|
64
64
|
function objectFilterOutValues<T extends Record<string, V>, V = unknown>(obj: T, value?: V | V[]): Partial<T>;
|
|
65
|
+
function objectReduce<R, T extends Object>(obj: T, callback: (acc: R, value: T[keyof T], key: keyof T) => R, initialValue: R): R;
|
|
65
66
|
const setImmediate: (fn: VoidFunction) => VoidFunction;
|
|
66
67
|
}
|
|
67
68
|
export default Utils;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import MediaOption from '../enums/MediaOption';
|
|
2
|
+
import MediaSettings from './MediaSettings';
|
|
3
|
+
import { Participant } from './Participant';
|
|
4
|
+
export interface IProcessMuteStateParams {
|
|
5
|
+
mediaOptions?: MediaOption[];
|
|
6
|
+
muteAll?: boolean;
|
|
7
|
+
unmute?: boolean;
|
|
8
|
+
serverSettings?: MediaSettings | null;
|
|
9
|
+
admin?: Participant | null;
|
|
10
|
+
stateUpdated?: boolean;
|
|
11
|
+
requestedMedia?: MediaOption[];
|
|
12
|
+
}
|
package/types/ExternalId.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
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';
|
|
5
4
|
import MuteStates from './MuteStates';
|
|
6
5
|
import { ParticipantListMarker, ParticipantListType, ParticipantStateMapped } from './Participant';
|
|
7
6
|
import SignalingMessage from './SignalingMessage';
|
|
@@ -95,7 +94,6 @@ export interface ExternalParticipant {
|
|
|
95
94
|
*/
|
|
96
95
|
unmuteOptions: MediaOption[];
|
|
97
96
|
markers?: ExternalParticipantListMarkers;
|
|
98
|
-
movieShareInfos?: ISharedMovieInfo[];
|
|
99
97
|
}
|
|
100
98
|
export interface ExternalParticipantListChunk {
|
|
101
99
|
participants: ExternalParticipant[];
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CompositeUserId } from './Participant';
|
|
2
|
+
import { ExternalParticipantId } from './ExternalId';
|
|
3
|
+
interface IFeedbackItem {
|
|
4
|
+
participantId: CompositeUserId;
|
|
5
|
+
/** event timestamps for this participant, chronologically */
|
|
6
|
+
times: number[];
|
|
7
|
+
}
|
|
8
|
+
export interface IFeedbackItemExternal extends Omit<IFeedbackItem, 'participantId'> {
|
|
9
|
+
participantId: ExternalParticipantId;
|
|
10
|
+
}
|
|
11
|
+
export interface IFeedback {
|
|
12
|
+
/** feedback ID; key values should be negotiated by clients themselves, like in ParticipantState, and have just the same restrictions; on backend the values of these keys are not bound in any way to those in ParticipantState */
|
|
13
|
+
key: string;
|
|
14
|
+
/** total amount of reactions of this type from the start of this call */
|
|
15
|
+
totalCount: number;
|
|
16
|
+
/** list of items containing initiator & all related data, if any */
|
|
17
|
+
items: IFeedbackItem[];
|
|
18
|
+
}
|
|
19
|
+
export interface IFeedbackExternal extends Omit<IFeedback, 'items'> {
|
|
20
|
+
items: IFeedbackItemExternal[];
|
|
21
|
+
}
|
|
22
|
+
export {};
|
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
|
+
vkMovieId?: string;
|
|
23
23
|
};
|
|
24
24
|
export default MediaSettings;
|
|
25
25
|
export declare function compareMediaSettings(ms1: MediaSettings, ms2: MediaSettings): boolean;
|
package/types/Participant.d.ts
CHANGED
|
@@ -4,7 +4,6 @@ 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';
|
|
8
7
|
import MuteStates from './MuteStates';
|
|
9
8
|
import ParticipantLayout from './ParticipantLayout';
|
|
10
9
|
/**
|
|
@@ -56,7 +55,6 @@ export interface Participant {
|
|
|
56
55
|
unmuteOptions: MediaOption[];
|
|
57
56
|
observedIds: CompositeUserId[];
|
|
58
57
|
markers?: ExternalParticipantListMarkers;
|
|
59
|
-
movieShareInfos?: ISharedMovieInfo[];
|
|
60
58
|
}
|
|
61
59
|
export interface IGetParticipantsParameters {
|
|
62
60
|
externalIds: ExternalId[];
|
|
@@ -7,9 +7,9 @@ import MediaOption from '../enums/MediaOption';
|
|
|
7
7
|
import ParticipantState from '../enums/ParticipantState';
|
|
8
8
|
import UserRole from '../enums/UserRole';
|
|
9
9
|
import UserType from '../enums/UserType';
|
|
10
|
+
import { IFeedback } from './Feedback';
|
|
10
11
|
import MediaModifiers from './MediaModifiers';
|
|
11
12
|
import MediaSettings from './MediaSettings';
|
|
12
|
-
import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from './MovieShare';
|
|
13
13
|
import MuteStates from './MuteStates';
|
|
14
14
|
import { CompositeUserId, OkUserId, ParticipantId, ParticipantListMarker as ParticipantParticipantListMarker, ParticipantListMarkers, ParticipantListType as ParticipantParticipantListType } from './Participant';
|
|
15
15
|
import VideoSettings from './VideoSettings';
|
|
@@ -55,7 +55,6 @@ declare namespace SignalingMessage {
|
|
|
55
55
|
unmuteOptions?: MediaOption[];
|
|
56
56
|
markers?: ParticipantListMarkers;
|
|
57
57
|
observedIds?: CompositeUserId[];
|
|
58
|
-
movieShareInfos?: ISharedMovieInfo[];
|
|
59
58
|
}
|
|
60
59
|
export interface ParticipantListChunk extends Notification {
|
|
61
60
|
participants: (Participant & Required<Pick<Participant, 'markers'>>)[];
|
|
@@ -150,6 +149,8 @@ declare namespace SignalingMessage {
|
|
|
150
149
|
muteStates: MuteStates;
|
|
151
150
|
unmuteOptions?: MediaOption[];
|
|
152
151
|
mediaOptions: MediaOption[];
|
|
152
|
+
requestedMedia?: MediaOption[];
|
|
153
|
+
stateUpdated?: boolean;
|
|
153
154
|
unmute?: boolean;
|
|
154
155
|
muteAll?: boolean;
|
|
155
156
|
}
|
|
@@ -279,13 +280,8 @@ declare namespace SignalingMessage {
|
|
|
279
280
|
export interface JoinLinkChanged extends Notification {
|
|
280
281
|
joinLink: string;
|
|
281
282
|
}
|
|
282
|
-
export interface
|
|
283
|
-
|
|
284
|
-
}
|
|
285
|
-
export interface SharedMovieInfo extends Notification {
|
|
286
|
-
movieShareInfo: ISharedMovieInfo;
|
|
287
|
-
}
|
|
288
|
-
export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
|
|
283
|
+
export interface Feedback extends Notification {
|
|
284
|
+
feedback: IFeedback[];
|
|
289
285
|
}
|
|
290
286
|
export {};
|
|
291
287
|
}
|
package/types/MovieShare.d.ts
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
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
|
-
}
|