@vkontakte/calls-sdk 2.6.2-dev.63ede13.0 → 2.6.2-dev.6c48704.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 +52 -8
- package/abstract/BaseApi.d.ts +6 -2
- package/abstract/BaseSignaling.d.ts +12 -3
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +24 -6
- 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/Api.d.ts +7 -2
- package/default/Api.test.d.ts +1 -0
- package/default/Signaling.d.ts +18 -4
- package/enums/ConversationFeature.d.ts +2 -1
- package/enums/ConversationOption.d.ts +2 -1
- package/enums/HangupType.d.ts +3 -1
- package/enums/MediaOption.d.ts +2 -1
- package/enums/RoomsEventType.d.ts +6 -0
- package/enums/SignalingCommandType.d.ts +8 -1
- package/enums/SignalingNotification.d.ts +8 -1
- package/package.json +1 -1
- package/static/ApiTransport.d.ts +1 -1
- package/static/External.d.ts +80 -5
- package/static/Params.d.ts +83 -4
- package/static/Utils.d.ts +5 -1
- package/types/Conversation.d.ts +12 -0
- package/types/ConversationParams.d.ts +1 -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 +42 -0
- package/types/Participant.d.ts +2 -0
- package/types/ParticipantLayout.d.ts +7 -1
- package/types/ParticipantListChunk.d.ts +2 -0
- package/types/Room.d.ts +60 -0
- package/types/SignalingMessage.d.ts +51 -0
- package/utils/Conversation.d.ts +2 -0
- 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';
|
|
@@ -37,6 +38,7 @@ export declare type ConversationData = {
|
|
|
37
38
|
*/
|
|
38
39
|
acceptTime: number | null;
|
|
39
40
|
features: ConversationFeature[];
|
|
41
|
+
featuresPerRole?: Partial<Record<ConversationFeature, UserRole[]>> | null;
|
|
40
42
|
/**
|
|
41
43
|
* ID звонка
|
|
42
44
|
*/
|
|
@@ -76,6 +78,7 @@ export default class Conversation extends EventEmitter {
|
|
|
76
78
|
private readonly _signaling;
|
|
77
79
|
private _mediaSource;
|
|
78
80
|
private _conversation;
|
|
81
|
+
private _myLastRequestedLayouts;
|
|
79
82
|
private _state;
|
|
80
83
|
private _participantState;
|
|
81
84
|
private _participants;
|
|
@@ -106,7 +109,7 @@ export default class Conversation extends EventEmitter {
|
|
|
106
109
|
static current(): Conversation | null;
|
|
107
110
|
static hangupAfterInit(): void;
|
|
108
111
|
static id(): string | null;
|
|
109
|
-
onStart(opponentIds: OkUserId[], opponentType: CallType, mediaOptions: MediaOption[], payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean): Promise<ConversationData>;
|
|
112
|
+
onStart(opponentIds: OkUserId[], opponentType: CallType, mediaOptions: MediaOption[], payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean, onlyAdminCanShareMovie?: boolean): Promise<ConversationData>;
|
|
110
113
|
onJoin(joinArgs: {
|
|
111
114
|
conversationId?: string;
|
|
112
115
|
mediaOptions: MediaOption[];
|
|
@@ -151,10 +154,12 @@ export default class Conversation extends EventEmitter {
|
|
|
151
154
|
private _processConnection;
|
|
152
155
|
private _prepareParticipants;
|
|
153
156
|
private _onConversationParticipantListChunk;
|
|
157
|
+
private _createParticipantListChunk;
|
|
154
158
|
private _participantListChunkToExternalChunk;
|
|
155
159
|
private _registerConnectionParticipants;
|
|
156
160
|
private _registerParticipants;
|
|
157
|
-
|
|
161
|
+
/** Установим состояние локальных мьютов */
|
|
162
|
+
private _registerParticipantLocalMuteState;
|
|
158
163
|
private _getStatusByTransportState;
|
|
159
164
|
private _registerParticipantInCache;
|
|
160
165
|
private _getExistedParticipantByIdOrCreate;
|
|
@@ -203,11 +208,12 @@ export default class Conversation extends EventEmitter {
|
|
|
203
208
|
private _stopStreaming;
|
|
204
209
|
private _sendUpdateDisplayLayout;
|
|
205
210
|
private _cleanupCooldownQueue;
|
|
206
|
-
private static _isStopStreaming;
|
|
207
|
-
private static _layoutToString;
|
|
208
211
|
private _onParticipantSourcesUpdate;
|
|
209
212
|
private _onParticipantPromoted;
|
|
210
213
|
private _onChatRoomUpdated;
|
|
214
|
+
private _onSharedMovieUpdate;
|
|
215
|
+
private _onSharedMovieInfoStarted;
|
|
216
|
+
private _onSharedMovieInfoStopped;
|
|
211
217
|
private _waitForStreamIfNeeded;
|
|
212
218
|
private _matchStreamDescription;
|
|
213
219
|
private _getWaitingTime;
|
|
@@ -215,6 +221,7 @@ export default class Conversation extends EventEmitter {
|
|
|
215
221
|
private _checkAdminRole;
|
|
216
222
|
grantRoles(participantId: CompositeUserId, roles: UserRole[], revoke: boolean): Promise<void>;
|
|
217
223
|
muteParticipant(participantId: ParticipantId | null, muteStates: MuteStates, requestedMedia?: MediaOption[]): Promise<void>;
|
|
224
|
+
enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<void>;
|
|
218
225
|
pinParticipant(participantId: ParticipantId, unpin: boolean): Promise<void>;
|
|
219
226
|
updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<void>;
|
|
220
227
|
changeOptions(changes: {
|
|
@@ -231,12 +238,16 @@ export default class Conversation extends EventEmitter {
|
|
|
231
238
|
customData(data: JSONObject, participantId?: ParticipantId | null): Promise<void>;
|
|
232
239
|
createJoinLink(): Promise<string>;
|
|
233
240
|
removeJoinLink(): Promise<never>;
|
|
234
|
-
addMovie(movieId:
|
|
241
|
+
addMovie({ movieId, gain, metadata }: IAddMovieParams): Promise<{
|
|
235
242
|
movieId: string;
|
|
236
243
|
streamType: string;
|
|
237
244
|
}>;
|
|
238
|
-
updateMovie(movieId: string, gain?: number, offset?:
|
|
245
|
+
updateMovie(movieId: string, gain?: number, offset?: number, pause?: boolean): Promise<void>;
|
|
239
246
|
removeMovie(movieId: string): Promise<void>;
|
|
247
|
+
updateRooms(rooms: SignalingMessage.Room[], assignRandomly: boolean): Promise<void>;
|
|
248
|
+
activateRooms(roomIds: number[], deactivate: boolean): Promise<void>;
|
|
249
|
+
switchRoom(toRoomId?: number, participantId?: ParticipantId): Promise<void>;
|
|
250
|
+
removeRooms(roomIds: number[]): Promise<void>;
|
|
240
251
|
startStream(isRecord?: boolean, name?: string | null, movieId?: string | null, privacy?: 'PUBLIC' | 'FRIENDS' | 'DIRECT_LINK', groupId?: string | null): Promise<SignalingMessage>;
|
|
241
252
|
stopStream(): Promise<SignalingMessage>;
|
|
242
253
|
recordSetRole(participantId: ParticipantId, role: RecordRole | null): Promise<void>;
|
|
@@ -250,6 +261,7 @@ export default class Conversation extends EventEmitter {
|
|
|
250
261
|
videoEffect(effect: IEffect | null): Promise<void>;
|
|
251
262
|
getParticipants(parameters: IGetParticipantsParameters): Promise<ExternalParticipant[]>;
|
|
252
263
|
getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<ExternalParticipantListChunk>;
|
|
264
|
+
private _getInitialParticiapntListChunk;
|
|
253
265
|
private _onLocalMediaStreamChanged;
|
|
254
266
|
private _onScreenSharingStatus;
|
|
255
267
|
private _changeRemoteMediaSettings;
|
|
@@ -305,6 +317,12 @@ export default class Conversation extends EventEmitter {
|
|
|
305
317
|
private _toggleJoinAvailability;
|
|
306
318
|
private _updateDisplayLayoutFromCache;
|
|
307
319
|
private _setParticipantsStatus;
|
|
320
|
+
private _onJoinLinkChanged;
|
|
321
|
+
private _onRoomsUpdated;
|
|
322
|
+
private _onRoomUpdated;
|
|
323
|
+
private _convertRoomToExternal;
|
|
324
|
+
private _onRoomParticipantsUpdated;
|
|
325
|
+
private _isMe;
|
|
308
326
|
}
|
|
309
327
|
export declare class UpdateDisplayLayoutError extends Error {
|
|
310
328
|
readonly participantErrors: {
|
|
@@ -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 | Blob): Promise<SignalingMessage | undefined>;
|
|
15
|
+
private deserializeUpdateDisplayLayoutResponse;
|
|
16
|
+
private deserializeReportPerfStatResponse;
|
|
17
|
+
}
|
package/default/Api.d.ts
CHANGED
|
@@ -16,8 +16,13 @@ export default class Api extends BaseApi {
|
|
|
16
16
|
log(items: LogItem[]): void;
|
|
17
17
|
init(): void;
|
|
18
18
|
joinConversation(conversationId: string, isVideo?: boolean, chatId?: string): Promise<ConversationResponse>;
|
|
19
|
-
createConversation(conversationId: string, payload?: string, requireAuthToJoin?: boolean
|
|
20
|
-
|
|
19
|
+
createConversation(conversationId: string, payload?: string, requireAuthToJoin?: boolean, { onlyAdminCanShareMovie }?: {
|
|
20
|
+
onlyAdminCanShareMovie?: boolean;
|
|
21
|
+
}): Promise<ConversationResponse>;
|
|
22
|
+
startConversation(conversationId: string, ids?: OkUserId[], type?: CallType, isVideo?: boolean, payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean, { onlyAdminCanShareMovie }?: {
|
|
23
|
+
onlyAdminCanShareMovie?: boolean;
|
|
24
|
+
}): Promise<ConversationResponse>;
|
|
25
|
+
private _preareStartConversationData;
|
|
21
26
|
private _startConversation;
|
|
22
27
|
createJoinLink(conversationId: string): Promise<{
|
|
23
28
|
join_link: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/default/Signaling.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import BaseSignaling, { AddParticipantParams } from '../abstract/BaseSignaling';
|
|
|
2
2
|
import { ParticipantIdRegistry } from '../classes/ParticipantIdRegistry';
|
|
3
3
|
import { PerfStatReport } from '../classes/transport/PerfStatReporter';
|
|
4
4
|
import { TransportTopology } from '../classes/transport/Transport';
|
|
5
|
+
import ConversationFeature from '../enums/ConversationFeature';
|
|
5
6
|
import ConversationOption from '../enums/ConversationOption';
|
|
6
7
|
import MediaOption from '../enums/MediaOption';
|
|
7
8
|
import RecordRole from '../enums/RecordRole';
|
|
@@ -11,8 +12,10 @@ import UserRole from '../enums/UserRole';
|
|
|
11
12
|
import { JSONObject } from '../static/Json';
|
|
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';
|
|
18
|
+
import ParticipantLayout, { RequestKeyFrame, StopStream } from '../types/ParticipantLayout';
|
|
16
19
|
import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
|
|
17
20
|
import SignalingMessage from '../types/SignalingMessage';
|
|
18
21
|
import { WaitingParticipantId } from '../types/WaitingHall';
|
|
@@ -39,6 +42,8 @@ export default class Signaling extends BaseSignaling {
|
|
|
39
42
|
private participantIdRegistry;
|
|
40
43
|
private producerNotificationDataChannel;
|
|
41
44
|
private producerCommandDataChannel;
|
|
45
|
+
private producerCommandDataChannelEnabled;
|
|
46
|
+
private producerCommandSerializationService;
|
|
42
47
|
private static readonly RECONNECT_DELAY;
|
|
43
48
|
private static readonly RECONNECT_MAX_DELAY;
|
|
44
49
|
private static readonly RECONNECT_MAX_COUNT;
|
|
@@ -52,6 +57,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
52
57
|
setParticipantIdRegistry(participantIdRegistry: ParticipantIdRegistry): void;
|
|
53
58
|
setProducerNotificationDataChannel(dataChannel: RTCDataChannel): void;
|
|
54
59
|
setProducerCommandDataChannel(dataChannel: RTCDataChannel): void;
|
|
60
|
+
useCommandDataChannel(status: boolean): void;
|
|
55
61
|
/**
|
|
56
62
|
* Free used resources
|
|
57
63
|
*/
|
|
@@ -89,12 +95,16 @@ export default class Signaling extends BaseSignaling {
|
|
|
89
95
|
changePriorities(priorities: {
|
|
90
96
|
[key: string]: number;
|
|
91
97
|
}): Promise<SignalingMessage | void>;
|
|
92
|
-
updateDisplayLayout(
|
|
93
|
-
[
|
|
98
|
+
updateDisplayLayout(layouts: {
|
|
99
|
+
[streamDesc: string]: ParticipantLayout | StopStream | RequestKeyFrame;
|
|
94
100
|
}): Promise<SignalingMessage>;
|
|
95
|
-
addMovie(data:
|
|
96
|
-
updateMovie(data:
|
|
101
|
+
addMovie(data: IAddMovieParams): Promise<SignalingMessage>;
|
|
102
|
+
updateMovie(data: ISharedMovieState): Promise<SignalingMessage>;
|
|
97
103
|
removeMovie(data: any): Promise<SignalingMessage>;
|
|
104
|
+
updateRooms(rooms: SignalingMessage.Room[], assignRandomly: boolean): Promise<SignalingMessage>;
|
|
105
|
+
activateRooms(roomIds: number[], deactivate: boolean): Promise<SignalingMessage>;
|
|
106
|
+
switchRoom(toRoomId?: number, participantId?: ParticipantId): Promise<SignalingMessage>;
|
|
107
|
+
removeRooms(roomIds: number[]): Promise<SignalingMessage>;
|
|
98
108
|
startStream(data: any): Promise<SignalingMessage>;
|
|
99
109
|
stopStream(): Promise<SignalingMessage>;
|
|
100
110
|
recordSetRole(participantId: ParticipantId, role: RecordRole | null): Promise<SignalingMessage>;
|
|
@@ -107,6 +117,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
107
117
|
customData(data: JSONObject, participantId: ParticipantId | null): Promise<SignalingMessage>;
|
|
108
118
|
grantRoles(participantId: CompositeUserId, roles: UserRole[], revoke: boolean): Promise<SignalingMessage>;
|
|
109
119
|
muteParticipant(participantId: ParticipantId | null, muteStates: MuteStates, requestedMedia: MediaOption[]): Promise<SignalingMessage>;
|
|
120
|
+
enableFeatureForRoles(feature: ConversationFeature, roles: UserRole[]): Promise<SignalingMessage>;
|
|
110
121
|
pinParticipant(participantId: ParticipantId, unpin: boolean): Promise<SignalingMessage>;
|
|
111
122
|
updateMediaModifiers(mediaModifiers: MediaModifiers): Promise<SignalingMessage>;
|
|
112
123
|
changeOptions(changes: {
|
|
@@ -140,6 +151,9 @@ export default class Signaling extends BaseSignaling {
|
|
|
140
151
|
protected _reconnect(): void;
|
|
141
152
|
private _handleCommandResponse;
|
|
142
153
|
private _handleCommandsQueue;
|
|
154
|
+
private _serializeBinary;
|
|
155
|
+
private _serializeJson;
|
|
156
|
+
private _convertDisplayLayout;
|
|
143
157
|
protected _waitConnectionMessage(): void;
|
|
144
158
|
protected _stopWaitConnectionMessage(): void;
|
|
145
159
|
private _startDoctor;
|
|
@@ -4,7 +4,8 @@
|
|
|
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"
|
|
8
9
|
}
|
|
9
10
|
export default ConversationOption;
|
|
10
11
|
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;
|
package/enums/MediaOption.d.ts
CHANGED
|
@@ -24,6 +24,7 @@ declare enum SignalingCommandType {
|
|
|
24
24
|
CUSTOM_DATA = "custom-data",
|
|
25
25
|
GRANT_ROLES = "grant-roles",
|
|
26
26
|
MUTE_PARTICIPANT = "mute-participant",
|
|
27
|
+
ENABLE_FEATURE_FOR_ROLES = "enable-feature-for-roles",
|
|
27
28
|
PIN_PARTICIPANT = "pin-participant",
|
|
28
29
|
UPDATE_MEDIA_MODIFIERS = "update-media-modifiers",
|
|
29
30
|
CHANGE_OPTIONS = "change-options",
|
|
@@ -34,6 +35,12 @@ declare enum SignalingCommandType {
|
|
|
34
35
|
REQUEST_TEST_MODE = "request-test-mode",
|
|
35
36
|
ADD_MOVIE = "add-movie",
|
|
36
37
|
UPDATE_MOVIE = "update-movie",
|
|
37
|
-
REMOVE_MOVIE = "remove-movie"
|
|
38
|
+
REMOVE_MOVIE = "remove-movie",
|
|
39
|
+
GET_ROOMS = "get_rooms",
|
|
40
|
+
GET_ROOM = "get_room",
|
|
41
|
+
UPDATE_ROOMS = "update-rooms",
|
|
42
|
+
ACTIVATE_ROOMS = "activate-rooms",
|
|
43
|
+
REMOVE_ROOMS = "remove-rooms",
|
|
44
|
+
SWITCH_ROOM = "switch-room"
|
|
38
45
|
}
|
|
39
46
|
export default SignalingCommandType;
|
|
@@ -35,6 +35,13 @@ 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",
|
|
43
|
+
ROOM_UPDATED = "room-updated",
|
|
44
|
+
ROOMS_UPDATED = "rooms-updated",
|
|
45
|
+
ROOM_PARTICIPANTS_UPDATED = "room-participants-updated"
|
|
39
46
|
}
|
|
40
47
|
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
|
@@ -6,12 +6,15 @@ import ChatRoomEventType from '../enums/ChatRoomEventType';
|
|
|
6
6
|
import ConversationOption from '../enums/ConversationOption';
|
|
7
7
|
import FatalError from '../enums/FatalError';
|
|
8
8
|
import MediaOption from '../enums/MediaOption';
|
|
9
|
+
import RoomsEventType from '../enums/RoomsEventType';
|
|
9
10
|
import UserRole from '../enums/UserRole';
|
|
10
11
|
import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalParticipantListMarkers } from '../types/ExternalId';
|
|
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';
|
|
17
|
+
import { Room, RoomParticipantUpdate, RoomsUpdate } from '../types/Room';
|
|
15
18
|
import { DebugMessageType } from './Debug';
|
|
16
19
|
import { JSONObject } from './Json';
|
|
17
20
|
/**
|
|
@@ -72,10 +75,31 @@ declare namespace External {
|
|
|
72
75
|
* Если сервер закончил стримить собеседника, вместо стрима будет передан null
|
|
73
76
|
*
|
|
74
77
|
* @param userId
|
|
75
|
-
* @param
|
|
76
|
-
|
|
78
|
+
* @param data
|
|
79
|
+
*/
|
|
80
|
+
function onRemoteLive(userId: ExternalParticipantId, data: IOnRemoteMovieData): void;
|
|
81
|
+
/**
|
|
82
|
+
* Получен собственный стрим лайв.
|
|
83
|
+
* Если сервер закончил стримить собеседника, вместо стрима будет передан null
|
|
84
|
+
*
|
|
85
|
+
* @param userId
|
|
86
|
+
* @param data
|
|
87
|
+
*/
|
|
88
|
+
function onLocalLive(userId: ExternalParticipantId, data: IOnRemoteMovieData): 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
|
|
77
101
|
*/
|
|
78
|
-
function
|
|
102
|
+
function onLocalLiveUpdate(userId: ExternalParticipantId, data: ISharedMovieState): void;
|
|
79
103
|
/**
|
|
80
104
|
* Получен стрим с экрана собеседника.
|
|
81
105
|
* Если сервер закончил стримить экран собеседника, вместо стрима будет передан null
|
|
@@ -92,7 +116,7 @@ declare namespace External {
|
|
|
92
116
|
* @param muteStates Состояние устройств при входе в звонок
|
|
93
117
|
* @param participants Список участников звонка (при `Params.batchParticipantsOnStart = true`)
|
|
94
118
|
*/
|
|
95
|
-
function onConversation(userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[]): void;
|
|
119
|
+
function onConversation(userId: ExternalParticipantId, mediaModifiers: MediaModifiers, muteStates: MuteStates, participants?: ExternalParticipant[], rooms?: Room[]): void;
|
|
96
120
|
/**
|
|
97
121
|
* Постраничные данные про участников при начале звонка
|
|
98
122
|
* @param chunk
|
|
@@ -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,8 +246,10 @@ declare namespace External {
|
|
|
187
246
|
* @param unmute Разрешение включить устройство
|
|
188
247
|
* @param userId Пользователь, для которого изменились разрешения или `null` для текущего пользователя
|
|
189
248
|
* @param adminId Пользователь, который изменил разрешения
|
|
249
|
+
* @param stateUpdated Если `true`, значит глобальное/персональное состояние изменилось и поля `muteStates`/`unmuteOptions` содержат обновления, если `false`, значит, эти поля не имеют значения
|
|
250
|
+
* @param requestedMedia Какие устройства попросили влючить участника
|
|
190
251
|
*/
|
|
191
|
-
function onMuteStates(muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll?: boolean, unmute?: boolean, userId?: ExternalParticipantId | null, adminId?: ExternalParticipantId | null): void;
|
|
252
|
+
function onMuteStates(muteStates: MuteStates, unmuteOptions: MediaOption[], mediaOptions: MediaOption[], muteAll?: boolean, unmute?: boolean, userId?: ExternalParticipantId | null, adminId?: ExternalParticipantId | null, stateUpdated?: boolean, requestedMedia?: MediaOption[]): void;
|
|
192
253
|
/**
|
|
193
254
|
* Изменились роли собеседника в звонке
|
|
194
255
|
*
|
|
@@ -348,5 +409,19 @@ declare namespace External {
|
|
|
348
409
|
* @param stream стрим от WebRTC
|
|
349
410
|
*/
|
|
350
411
|
function onRemoteMixedAudioStream(stream: MediaStream): void;
|
|
412
|
+
/**
|
|
413
|
+
* Получена новая ссылка на звонок
|
|
414
|
+
* @param joinLink токен присоединения к звонку
|
|
415
|
+
*/
|
|
416
|
+
function onJoinLinkChanged(joinLink: string): void;
|
|
417
|
+
/**
|
|
418
|
+
*/
|
|
419
|
+
function onRoomsUpdated(updates: Partial<Record<RoomsEventType, RoomsUpdate>>): void;
|
|
420
|
+
/**
|
|
421
|
+
*/
|
|
422
|
+
function onRoomUpdated(eventTypes: RoomsEventType[], roomId: number, room: Room | null): void;
|
|
423
|
+
/**
|
|
424
|
+
*/
|
|
425
|
+
function onRoomParticipantsUpdated(update: RoomParticipantUpdate): void;
|
|
351
426
|
}
|
|
352
427
|
export default External;
|