@vkontakte/calls-sdk 2.6.2-dev.aa1b4e2.0 → 2.6.2-dev.ba1d45f.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 +11 -4
- package/abstract/BaseSignaling.d.ts +5 -2
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +12 -2
- 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 +5 -2
- 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 +6 -1
- package/package.json +1 -1
- package/static/External.d.ts +65 -3
- package/static/Params.d.ts +53 -1
- package/static/Utils.d.ts +1 -1
- package/types/ExternalId.d.ts +2 -0
- package/types/Feedback.d.ts +29 -0
- package/types/MediaSettings.d.ts +1 -1
- package/types/MovieShare.d.ts +42 -0
- package/types/Participant.d.ts +2 -0
- package/types/SignalingMessage.d.ts +14 -0
- package/types/WaitingHall.d.ts +2 -8
|
@@ -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';
|
|
@@ -23,6 +24,7 @@ import ParticipantPriority from '../types/ParticipantPriority';
|
|
|
23
24
|
import { ParticipantStreamDescription } from '../types/ParticipantStreamDescription';
|
|
24
25
|
import SignalingMessage, { RecordInfo } from '../types/SignalingMessage';
|
|
25
26
|
import { WaitingHallResponse } from '../types/WaitingHall';
|
|
27
|
+
import { EFeedbackKey } from '../types/Feedback';
|
|
26
28
|
import EventEmitter from './EventEmitter';
|
|
27
29
|
import { TransportTopology } from './transport/Transport';
|
|
28
30
|
/**
|
|
@@ -151,6 +153,7 @@ export default class Conversation extends EventEmitter {
|
|
|
151
153
|
private _processConnection;
|
|
152
154
|
private _prepareParticipants;
|
|
153
155
|
private _onConversationParticipantListChunk;
|
|
156
|
+
private _createParticipantListChunk;
|
|
154
157
|
private _participantListChunkToExternalChunk;
|
|
155
158
|
private _registerConnectionParticipants;
|
|
156
159
|
private _registerParticipants;
|
|
@@ -202,12 +205,17 @@ export default class Conversation extends EventEmitter {
|
|
|
202
205
|
requestKeyFrame(participantStreamDescription: ParticipantStreamDescription): Promise<void | SignalingMessage>;
|
|
203
206
|
requestTestMode(consumerCommand: string, producerCommand: string): Promise<void>;
|
|
204
207
|
updateDisplayLayout(layouts: ParticipantLayout[]): Promise<void>;
|
|
208
|
+
/** @async */
|
|
209
|
+
feedback(key: EFeedbackKey): Promise<SignalingMessage>;
|
|
205
210
|
private _stopStreaming;
|
|
206
211
|
private _sendUpdateDisplayLayout;
|
|
207
212
|
private _cleanupCooldownQueue;
|
|
208
213
|
private _onParticipantSourcesUpdate;
|
|
209
214
|
private _onParticipantPromoted;
|
|
210
215
|
private _onChatRoomUpdated;
|
|
216
|
+
private _onSharedMovieUpdate;
|
|
217
|
+
private _onSharedMovieInfoStarted;
|
|
218
|
+
private _onSharedMovieInfoStopped;
|
|
211
219
|
private _waitForStreamIfNeeded;
|
|
212
220
|
private _matchStreamDescription;
|
|
213
221
|
private _getWaitingTime;
|
|
@@ -231,11 +239,11 @@ export default class Conversation extends EventEmitter {
|
|
|
231
239
|
customData(data: JSONObject, participantId?: ParticipantId | null): Promise<void>;
|
|
232
240
|
createJoinLink(): Promise<string>;
|
|
233
241
|
removeJoinLink(): Promise<never>;
|
|
234
|
-
addMovie(movieId:
|
|
242
|
+
addMovie({ movieId, gain, metadata }: IAddMovieParams): Promise<{
|
|
235
243
|
movieId: string;
|
|
236
244
|
streamType: string;
|
|
237
245
|
}>;
|
|
238
|
-
updateMovie(movieId: string, gain?: number, offset?:
|
|
246
|
+
updateMovie(movieId: string, gain?: number, offset?: number, pause?: boolean): Promise<void>;
|
|
239
247
|
removeMovie(movieId: string): Promise<void>;
|
|
240
248
|
startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null): Promise<SignalingMessage>;
|
|
241
249
|
stopStream(): Promise<SignalingMessage>;
|
|
@@ -307,6 +315,8 @@ export default class Conversation extends EventEmitter {
|
|
|
307
315
|
private _updateDisplayLayoutFromCache;
|
|
308
316
|
private _setParticipantsStatus;
|
|
309
317
|
private _onJoinLinkChanged;
|
|
318
|
+
/** получили из сингналинга сообщение о реакции пользователей */
|
|
319
|
+
private _onFeedback;
|
|
310
320
|
}
|
|
311
321
|
export declare class UpdateDisplayLayoutError extends Error {
|
|
312
322
|
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
|
@@ -9,8 +9,10 @@ import SignalingCommandType from '../enums/SignalingCommandType';
|
|
|
9
9
|
import SignalingConnectionType from '../enums/SignalingConnectionType';
|
|
10
10
|
import UserRole from '../enums/UserRole';
|
|
11
11
|
import { JSONObject } from '../static/Json';
|
|
12
|
+
import { EFeedbackKey } from '../types/Feedback';
|
|
12
13
|
import MediaModifiers from '../types/MediaModifiers';
|
|
13
14
|
import MediaSettings from '../types/MediaSettings';
|
|
15
|
+
import { IAddMovieParams, ISharedMovieState } from '../types/MovieShare';
|
|
14
16
|
import MuteStates from '../types/MuteStates';
|
|
15
17
|
import { CompositeUserId, ParticipantId } from '../types/Participant';
|
|
16
18
|
import ParticipantLayout, { RequestKeyFrame, StopStream } from '../types/ParticipantLayout';
|
|
@@ -96,8 +98,8 @@ export default class Signaling extends BaseSignaling {
|
|
|
96
98
|
updateDisplayLayout(layouts: {
|
|
97
99
|
[streamDesc: string]: ParticipantLayout | StopStream | RequestKeyFrame;
|
|
98
100
|
}): Promise<SignalingMessage>;
|
|
99
|
-
addMovie(data:
|
|
100
|
-
updateMovie(data:
|
|
101
|
+
addMovie(data: IAddMovieParams): Promise<SignalingMessage>;
|
|
102
|
+
updateMovie(data: ISharedMovieState): Promise<SignalingMessage>;
|
|
101
103
|
removeMovie(data: any): Promise<SignalingMessage>;
|
|
102
104
|
startStream(data: any): Promise<SignalingMessage>;
|
|
103
105
|
stopStream(): Promise<SignalingMessage>;
|
|
@@ -118,6 +120,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
118
120
|
}): Promise<SignalingMessage>;
|
|
119
121
|
getWaitingHall(fromId?: WaitingParticipantId | null, count?: number, backward?: boolean): Promise<SignalingMessage>;
|
|
120
122
|
promoteParticipant(participantId: CompositeUserId, demote?: boolean): Promise<SignalingMessage>;
|
|
123
|
+
feedback(key: EFeedbackKey): Promise<SignalingMessage>;
|
|
121
124
|
/**
|
|
122
125
|
* Close a connection with a signaling server
|
|
123
126
|
*/
|
|
@@ -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;
|
|
@@ -35,6 +35,11 @@ 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
|
+
FEEDBACK = "feedback",
|
|
40
|
+
MOVIE_UPDATE_NOTIFICATION = "movie-update-notification",
|
|
41
|
+
MOVIE_SHARE_INFO = "movie-share-info",
|
|
42
|
+
MOVIE_SHARE_STARTED = "movie-share-started",
|
|
43
|
+
MOVIE_SHARE_STOPPED = "movie-share-stopped"
|
|
39
44
|
}
|
|
40
45
|
export default SignalingNotification;
|
package/package.json
CHANGED
package/static/External.d.ts
CHANGED
|
@@ -8,8 +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 MediaModifiers from '../types/MediaModifiers';
|
|
12
13
|
import MediaSettings from '../types/MediaSettings';
|
|
14
|
+
import { IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
|
|
13
15
|
import MuteStates from '../types/MuteStates';
|
|
14
16
|
import { ParticipantStateMapped } from '../types/Participant';
|
|
15
17
|
import { DebugMessageType } from './Debug';
|
|
@@ -72,10 +74,31 @@ declare namespace External {
|
|
|
72
74
|
* Если сервер закончил стримить собеседника, вместо стрима будет передан null
|
|
73
75
|
*
|
|
74
76
|
* @param userId
|
|
75
|
-
* @param
|
|
76
|
-
* @param stream
|
|
77
|
+
* @param data
|
|
77
78
|
*/
|
|
78
|
-
function onRemoteLive(userId: ExternalParticipantId,
|
|
79
|
+
function onRemoteLive(userId: ExternalParticipantId, data: IOnRemoteMovieData): void;
|
|
80
|
+
/**
|
|
81
|
+
* Получен собственный стрим лайв.
|
|
82
|
+
* Если сервер закончил стримить собеседника, вместо стрима будет передан null
|
|
83
|
+
*
|
|
84
|
+
* @param userId
|
|
85
|
+
* @param data
|
|
86
|
+
*/
|
|
87
|
+
function onLocalLive(userId: ExternalParticipantId, data: IOnRemoteMovieData): void;
|
|
88
|
+
/**
|
|
89
|
+
* Получено обновление стрима или лайва от собеседника.
|
|
90
|
+
*
|
|
91
|
+
* @param userId
|
|
92
|
+
* @param data
|
|
93
|
+
*/
|
|
94
|
+
function onRemoteLiveUpdate(userId: ExternalParticipantId, data: ISharedMovieState): void;
|
|
95
|
+
/**
|
|
96
|
+
* Получено обновление собственного стрима или лайва.
|
|
97
|
+
*
|
|
98
|
+
* @param userId
|
|
99
|
+
* @param data
|
|
100
|
+
*/
|
|
101
|
+
function onLocalLiveUpdate(userId: ExternalParticipantId, data: ISharedMovieState): void;
|
|
79
102
|
/**
|
|
80
103
|
* Получен стрим с экрана собеседника.
|
|
81
104
|
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
@@ -106,6 +129,41 @@ declare namespace External {
|
|
|
106
129
|
* @param markers
|
|
107
130
|
*/
|
|
108
131
|
function onRemoteMediaSettings(userId: ExternalParticipantId, mediaSettings: MediaSettings, markers?: ExternalParticipantListMarkers): void;
|
|
132
|
+
/**
|
|
133
|
+
* Изменились данные собственного стрима
|
|
134
|
+
*
|
|
135
|
+
* @param userId
|
|
136
|
+
* @param mediaSettings
|
|
137
|
+
*/
|
|
138
|
+
function onLocalMediaSettings(userId: ExternalParticipantId, mediaSettings: MediaSettings): void;
|
|
139
|
+
/**
|
|
140
|
+
* Полученны данные по стримам (лайв/мувик) от собеседника
|
|
141
|
+
*
|
|
142
|
+
* @param userId
|
|
143
|
+
* @param sharedMovieInfo
|
|
144
|
+
*/
|
|
145
|
+
function onRemoteSharedMovieInfo(userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo): void;
|
|
146
|
+
/**
|
|
147
|
+
* Полученны данные по остановленным стримам (лайв/мувик) от собеседника
|
|
148
|
+
*
|
|
149
|
+
* @param userId
|
|
150
|
+
* @param sharedMovieStoppedInfo
|
|
151
|
+
*/
|
|
152
|
+
function onRemoteSharedMovieStoppedInfo(userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo): void;
|
|
153
|
+
/**
|
|
154
|
+
* Полученны данные по собственным стримам (лайв/мувик)
|
|
155
|
+
*
|
|
156
|
+
* @param userId
|
|
157
|
+
* @param sharedMovieInfo
|
|
158
|
+
*/
|
|
159
|
+
function onLocalSharedMovieInfo(userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo): void;
|
|
160
|
+
/**
|
|
161
|
+
* Полученны данные по собственным остановленным стримам (лайв/мувик)
|
|
162
|
+
*
|
|
163
|
+
* @param userId
|
|
164
|
+
* @param sharedMovieStoppedInfo
|
|
165
|
+
*/
|
|
166
|
+
function onLocalSharedMovieStoppedInfo(userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo): void;
|
|
109
167
|
/**
|
|
110
168
|
* Добавили участника
|
|
111
169
|
*
|
|
@@ -355,5 +413,9 @@ declare namespace External {
|
|
|
355
413
|
* @param joinLink токен присоединения к звонку
|
|
356
414
|
*/
|
|
357
415
|
function onJoinLinkChanged(joinLink: string): void;
|
|
416
|
+
/**
|
|
417
|
+
* Получена новая реакция
|
|
418
|
+
*/
|
|
419
|
+
function onFeedback(feedback: IFeedbackExternal[]): void;
|
|
358
420
|
}
|
|
359
421
|
export default External;
|
package/static/Params.d.ts
CHANGED
|
@@ -8,9 +8,11 @@ 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';
|
|
15
|
+
import { IOnRemoteMovieData, ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from '../types/MovieShare';
|
|
14
16
|
import MuteStates from '../types/MuteStates';
|
|
15
17
|
import { ParticipantStateMapped } from '../types/Participant';
|
|
16
18
|
import AuthData from './AuthData';
|
|
@@ -43,6 +45,11 @@ export declare type ParamsObject = {
|
|
|
43
45
|
* Домен, чтобы попасть в тестовую группу. Для тестирования экспериментальных улучшений существуют отдельные сервера, чтобы собирать фидбек и уже потом раскатывать на всех юзеров. Если передать сюда специальный ключ, то конверсейшн будет обрабатываться на таком сервере.
|
|
44
46
|
*/
|
|
45
47
|
domain: string;
|
|
48
|
+
/**
|
|
49
|
+
* Домен, куда будет ходить Ok api за данными
|
|
50
|
+
* @hidden
|
|
51
|
+
*/
|
|
52
|
+
externalDomain: string;
|
|
46
53
|
iceServers: IceServer[];
|
|
47
54
|
wssBase: string;
|
|
48
55
|
wssToken: string;
|
|
@@ -247,6 +254,11 @@ export declare type ParamsObject = {
|
|
|
247
254
|
* Включать RED-extension (redundancy) для p2p звонков
|
|
248
255
|
*/
|
|
249
256
|
p2pAudioRed: boolean;
|
|
257
|
+
/**
|
|
258
|
+
* Добавлять флаг spsPpsIdrInKeyframe для h264 кодека. В результате ключевые фреймы без sps и pps
|
|
259
|
+
* не используются как ключевые. Решает проблему с артефактами на видео в случае потерь пакетов.
|
|
260
|
+
*/
|
|
261
|
+
h264spsPpsIdrInKeyframe: boolean;
|
|
250
262
|
/**
|
|
251
263
|
* Получать список участников звонка третьим аргументом в `onConversation`
|
|
252
264
|
* @hidden
|
|
@@ -300,7 +312,20 @@ export declare type ParamsObject = {
|
|
|
300
312
|
* Получен стрим трансляция или мувик от собеседника.
|
|
301
313
|
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
302
314
|
*/
|
|
303
|
-
onRemoteLive?: (userId: ExternalParticipantId,
|
|
315
|
+
onRemoteLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData) => void;
|
|
316
|
+
/**
|
|
317
|
+
* Получен собственный стрим трансляция или мувик.
|
|
318
|
+
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
319
|
+
*/
|
|
320
|
+
onLocalLive?: (userId: ExternalParticipantId, data: IOnRemoteMovieData) => void;
|
|
321
|
+
/**
|
|
322
|
+
* Получено обновление стрима или лайва от собеседника.
|
|
323
|
+
*/
|
|
324
|
+
onRemoteLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState) => void;
|
|
325
|
+
/**
|
|
326
|
+
* Получено обновление собственного стрима или лайва.
|
|
327
|
+
*/
|
|
328
|
+
onLocalLiveUpdate?: (userId: ExternalParticipantId, data: ISharedMovieState) => void;
|
|
304
329
|
/**
|
|
305
330
|
* Начат звонок
|
|
306
331
|
*/
|
|
@@ -313,6 +338,26 @@ export declare type ParamsObject = {
|
|
|
313
338
|
* Изменились данные стрима собеседника
|
|
314
339
|
*/
|
|
315
340
|
onRemoteMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings, markers?: ExternalParticipantListMarkers) => void;
|
|
341
|
+
/**
|
|
342
|
+
* Изменились данные стрима собеседника
|
|
343
|
+
*/
|
|
344
|
+
onLocalMediaSettings?: (userId: ExternalParticipantId, mediaSettings: MediaSettings) => void;
|
|
345
|
+
/**
|
|
346
|
+
* Полученны данные по стримам (лайв/мувик) от собеседника
|
|
347
|
+
*/
|
|
348
|
+
onRemoteSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo) => void;
|
|
349
|
+
/**
|
|
350
|
+
* Полученны данные по остановленным стримам (лайв/мувик) от собеседника
|
|
351
|
+
*/
|
|
352
|
+
onRemoteSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo) => void;
|
|
353
|
+
/**
|
|
354
|
+
* Полученны данные по собственным стримам (лайв/мувик)
|
|
355
|
+
*/
|
|
356
|
+
onLocalSharedMovieInfo?: (userId: ExternalParticipantId, sharedMovieInfo: ISharedMovieInfo) => void;
|
|
357
|
+
/**
|
|
358
|
+
* Полученны данные по собственным остановленным стримам (лайв/мувик)
|
|
359
|
+
*/
|
|
360
|
+
onLocalSharedMovieStoppedInfo?: (userId: ExternalParticipantId, sharedMovieStoppedInfo: ISharedMovieStoppedInfo) => void;
|
|
316
361
|
/**
|
|
317
362
|
* Добавили участника
|
|
318
363
|
*/
|
|
@@ -478,6 +523,11 @@ export declare type ParamsObject = {
|
|
|
478
523
|
* @param joinLink токен присоединения к звонку
|
|
479
524
|
*/
|
|
480
525
|
onJoinLinkChanged?: (joinLink: string) => void;
|
|
526
|
+
/**
|
|
527
|
+
* Получены новые реакции в звонке
|
|
528
|
+
* @param feedback массив с реакциями
|
|
529
|
+
*/
|
|
530
|
+
onFeedback?: (feedback: IFeedbackExternal[]) => void;
|
|
481
531
|
};
|
|
482
532
|
export default abstract class Params {
|
|
483
533
|
private static _params;
|
|
@@ -503,6 +553,7 @@ export default abstract class Params {
|
|
|
503
553
|
static get anonymToken(): string;
|
|
504
554
|
static set anonymToken(value: string);
|
|
505
555
|
static get domain(): string;
|
|
556
|
+
static get externalDomain(): string;
|
|
506
557
|
static get iceServers(): IceServer[];
|
|
507
558
|
static set iceServers(value: IceServer[]);
|
|
508
559
|
static get wssBase(): string;
|
|
@@ -571,6 +622,7 @@ export default abstract class Params {
|
|
|
571
622
|
static get participantListChunkInitCount(): number;
|
|
572
623
|
static get serverAudioRed(): boolean;
|
|
573
624
|
static get p2pAudioRed(): boolean;
|
|
625
|
+
static get h264spsPpsIdrInKeyframe(): boolean;
|
|
574
626
|
static get batchParticipantsOnStart(): boolean;
|
|
575
627
|
static get filterObservers(): boolean;
|
|
576
628
|
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>;
|
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,29 @@
|
|
|
1
|
+
import { CompositeUserId } from './Participant';
|
|
2
|
+
import { ExternalParticipantId } from './ExternalId';
|
|
3
|
+
export declare enum EFeedbackKey {
|
|
4
|
+
Like = "like",
|
|
5
|
+
DLike = "dlike",
|
|
6
|
+
Heart = "heart",
|
|
7
|
+
Laugh = "laugh",
|
|
8
|
+
Cry = "cry"
|
|
9
|
+
}
|
|
10
|
+
interface IFeedbackItem {
|
|
11
|
+
participantId: CompositeUserId;
|
|
12
|
+
/** event timestamps for this participant, chronologically */
|
|
13
|
+
times: number[];
|
|
14
|
+
}
|
|
15
|
+
export interface IFeedbackItemExternal extends Omit<IFeedbackItem, 'participantId'> {
|
|
16
|
+
participantId: ExternalParticipantId;
|
|
17
|
+
}
|
|
18
|
+
export interface IFeedback {
|
|
19
|
+
/** 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 */
|
|
20
|
+
key: EFeedbackKey;
|
|
21
|
+
/** total amount of reactions of this type from the start of this call */
|
|
22
|
+
totalCount: number;
|
|
23
|
+
/** list of items containing initiator & all related data, if any */
|
|
24
|
+
items: IFeedbackItem[];
|
|
25
|
+
}
|
|
26
|
+
export interface IFeedbackExternal extends Omit<IFeedback, 'items'> {
|
|
27
|
+
items: IFeedbackItemExternal[];
|
|
28
|
+
}
|
|
29
|
+
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
|
+
externalMovieId?: string;
|
|
23
23
|
};
|
|
24
24
|
export default MediaSettings;
|
|
25
25
|
export declare function compareMediaSettings(ms1: MediaSettings, ms2: MediaSettings): boolean;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { OkUserId, CompositeUserId } from './Participant';
|
|
2
|
+
import { MediaType } from './ParticipantStreamDescription';
|
|
3
|
+
export interface IMoviePreview {
|
|
4
|
+
url: string;
|
|
5
|
+
width: number;
|
|
6
|
+
height: number;
|
|
7
|
+
}
|
|
8
|
+
export interface IAddMovieParams {
|
|
9
|
+
movieId: string;
|
|
10
|
+
gain?: number;
|
|
11
|
+
metadata?: {
|
|
12
|
+
title?: string;
|
|
13
|
+
thumbnails?: IMoviePreview[];
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
export declare type ISharedMovieStateResponse = [number, number, boolean, number, number];
|
|
17
|
+
export interface ISharedMovieState {
|
|
18
|
+
participantId: CompositeUserId;
|
|
19
|
+
gain?: number;
|
|
20
|
+
pause?: boolean;
|
|
21
|
+
offset?: number;
|
|
22
|
+
duration?: number;
|
|
23
|
+
}
|
|
24
|
+
export interface ISharedMovieInfo {
|
|
25
|
+
movieId: OkUserId;
|
|
26
|
+
initiatorId: CompositeUserId;
|
|
27
|
+
title: string;
|
|
28
|
+
source: MediaType;
|
|
29
|
+
externalMovieId: string;
|
|
30
|
+
duration: number;
|
|
31
|
+
thumbnails: IMoviePreview[];
|
|
32
|
+
}
|
|
33
|
+
export interface ISharedMovieStoppedInfo {
|
|
34
|
+
movieId: OkUserId;
|
|
35
|
+
initiatorId: CompositeUserId;
|
|
36
|
+
source: MediaType;
|
|
37
|
+
}
|
|
38
|
+
export interface IOnRemoteMovieData {
|
|
39
|
+
streamName: string;
|
|
40
|
+
stream: MediaStream | null;
|
|
41
|
+
mediaType: MediaType;
|
|
42
|
+
}
|
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[];
|
|
@@ -7,8 +7,10 @@ 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';
|
|
13
|
+
import { ISharedMovieInfo, ISharedMovieState, ISharedMovieStoppedInfo } from './MovieShare';
|
|
12
14
|
import MuteStates from './MuteStates';
|
|
13
15
|
import { CompositeUserId, OkUserId, ParticipantId, ParticipantListMarker as ParticipantParticipantListMarker, ParticipantListMarkers, ParticipantListType as ParticipantParticipantListType } from './Participant';
|
|
14
16
|
import VideoSettings from './VideoSettings';
|
|
@@ -54,6 +56,7 @@ declare namespace SignalingMessage {
|
|
|
54
56
|
unmuteOptions?: MediaOption[];
|
|
55
57
|
markers?: ParticipantListMarkers;
|
|
56
58
|
observedIds?: CompositeUserId[];
|
|
59
|
+
movieShareInfos?: ISharedMovieInfo[];
|
|
57
60
|
}
|
|
58
61
|
export interface ParticipantListChunk extends Notification {
|
|
59
62
|
participants: (Participant & Required<Pick<Participant, 'markers'>>)[];
|
|
@@ -279,6 +282,17 @@ declare namespace SignalingMessage {
|
|
|
279
282
|
export interface JoinLinkChanged extends Notification {
|
|
280
283
|
joinLink: string;
|
|
281
284
|
}
|
|
285
|
+
export interface Feedback extends Notification {
|
|
286
|
+
feedback: IFeedback[];
|
|
287
|
+
}
|
|
288
|
+
export interface SharedMovieState extends Notification {
|
|
289
|
+
data: ISharedMovieState[];
|
|
290
|
+
}
|
|
291
|
+
export interface SharedMovieInfo extends Notification {
|
|
292
|
+
movieShareInfo: ISharedMovieInfo;
|
|
293
|
+
}
|
|
294
|
+
export interface SharedMovieStoppedInfo extends Notification, ISharedMovieStoppedInfo {
|
|
295
|
+
}
|
|
282
296
|
export {};
|
|
283
297
|
}
|
|
284
298
|
export default SignalingMessage;
|
package/types/WaitingHall.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ExternalId } from './ExternalId';
|
|
2
2
|
import { CompositeUserId } from './Participant';
|
|
3
3
|
import SignalingMessage from './SignalingMessage';
|
|
4
|
+
import { IFeedback } from './Feedback';
|
|
4
5
|
export declare type WaitingParticipantId = {
|
|
5
6
|
addedTs: number;
|
|
6
7
|
id: CompositeUserId;
|
|
@@ -9,18 +10,11 @@ export declare type WaitingParticipant = {
|
|
|
9
10
|
id: WaitingParticipantId;
|
|
10
11
|
externalId?: SignalingMessage.ExternalId;
|
|
11
12
|
};
|
|
12
|
-
export declare type Feedback = {
|
|
13
|
-
key: string;
|
|
14
|
-
totalCount: number;
|
|
15
|
-
currentCount: number;
|
|
16
|
-
timeout: number;
|
|
17
|
-
participantIds: CompositeUserId[];
|
|
18
|
-
};
|
|
19
13
|
export declare type ChatRoom = {
|
|
20
14
|
totalCount: number;
|
|
21
15
|
firstParticipants?: WaitingParticipant[];
|
|
22
16
|
handCount?: number;
|
|
23
|
-
feedback?:
|
|
17
|
+
feedback?: IFeedback[];
|
|
24
18
|
};
|
|
25
19
|
/**
|
|
26
20
|
* Ответ на запрос `getWaitingHall`
|