@vkontakte/calls-sdk 2.5.3-dev.80ed530.0 → 2.5.3-dev.c7053bb.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 -2
- package/abstract/BaseSignaling.d.ts +2 -1
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +6 -2
- package/classes/transport/Transport.d.ts +1 -0
- package/default/Signaling.d.ts +2 -1
- package/enums/SignalingCommandType.d.ts +1 -0
- package/package.json +1 -1
- package/static/Utils.d.ts +6 -1
- package/static/Utils.test.d.ts +1 -0
- package/types/Participant.d.ts +4 -1
- package/types/SignalingMessage.d.ts +7 -6
- package/types/WaitingHall.d.ts +13 -0
- package/worker/WebCodecsDecoderWorker.d.ts +1 -1
|
@@ -12,11 +12,11 @@ import UpdateDisplayLayoutErrorReason from '../enums/UpdateDisplayLayoutErrorRea
|
|
|
12
12
|
import UserRole from '../enums/UserRole';
|
|
13
13
|
import UserType from '../enums/UserType';
|
|
14
14
|
import { JSONObject } from '../static/Json';
|
|
15
|
-
import { ExternalParticipantId, ExternalParticipantListChunk, ExternalUserId } from '../types/ExternalId';
|
|
15
|
+
import { ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalUserId } from '../types/ExternalId';
|
|
16
16
|
import MediaModifiers from '../types/MediaModifiers';
|
|
17
17
|
import { IVideoDimentions } from '../types/MediaSettings';
|
|
18
18
|
import MuteStates from '../types/MuteStates';
|
|
19
|
-
import { CompositeUserId, OkUserId, ParticipantId } from '../types/Participant';
|
|
19
|
+
import { CompositeUserId, IGetParticipantsParameters, OkUserId, ParticipantId } from '../types/Participant';
|
|
20
20
|
import { ParticipantLayout } from '../types/ParticipantLayout';
|
|
21
21
|
import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
|
|
22
22
|
import ParticipantPriority from '../types/ParticipantPriority';
|
|
@@ -154,6 +154,8 @@ export default class Conversation extends EventEmitter {
|
|
|
154
154
|
private _participantListChunkToExternalChunk;
|
|
155
155
|
private _registerConnectionParticipants;
|
|
156
156
|
private _registerParticipants;
|
|
157
|
+
private _getClientType;
|
|
158
|
+
private _getStatusByTransportState;
|
|
157
159
|
private _registerParticipantInCache;
|
|
158
160
|
private _getExistedParticipantByIdOrCreate;
|
|
159
161
|
private _getExternalIdByParticipantId;
|
|
@@ -196,6 +198,7 @@ export default class Conversation extends EventEmitter {
|
|
|
196
198
|
[key: string]: string;
|
|
197
199
|
}): Promise<void>;
|
|
198
200
|
requestKeyFrame(participantStreamDescription: ParticipantStreamDescription): Promise<void | SignalingMessage>;
|
|
201
|
+
requestTestMode(consumerCommand: string, producerCommand: string): Promise<void>;
|
|
199
202
|
updateDisplayLayout(layouts: ParticipantLayout[]): Promise<void>;
|
|
200
203
|
private _stopStreaming;
|
|
201
204
|
private _sendUpdateDisplayLayout;
|
|
@@ -245,6 +248,7 @@ export default class Conversation extends EventEmitter {
|
|
|
245
248
|
effect: IVideoDimentions;
|
|
246
249
|
}): Promise<void>;
|
|
247
250
|
videoEffect(effect: IEffect | null): Promise<void>;
|
|
251
|
+
getParticipants(parameters: IGetParticipantsParameters): Promise<ExternalParticipant[]>;
|
|
248
252
|
getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<ExternalParticipantListChunk>;
|
|
249
253
|
private _onLocalMediaStreamChanged;
|
|
250
254
|
private _onScreenSharingStatus;
|
package/default/Signaling.d.ts
CHANGED
|
@@ -73,7 +73,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
73
73
|
getNextCommandSequenceNumber(): number;
|
|
74
74
|
hangup(reason: string): Promise<SignalingMessage | void>;
|
|
75
75
|
sendCandidate(participantId: ParticipantId, candidate: RTCIceCandidate): Promise<SignalingMessage>;
|
|
76
|
-
requestTestMode(
|
|
76
|
+
requestTestMode(consumerCommand: string, producerCommand: string): Promise<SignalingMessage>;
|
|
77
77
|
sendSdp(participantId: ParticipantId, sdp: RTCSessionDescription): Promise<SignalingMessage>;
|
|
78
78
|
acceptCall(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
79
79
|
changeMediaSettings(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
@@ -126,6 +126,7 @@ export default class Signaling extends BaseSignaling {
|
|
|
126
126
|
*/
|
|
127
127
|
readyToSend(): void;
|
|
128
128
|
getParticipantListChunk(participantListChunkParameters: ParticipantListChunkParameters): Promise<SignalingMessage>;
|
|
129
|
+
getParticipants(externalIds: SignalingMessage.ExternalId[]): Promise<SignalingMessage>;
|
|
129
130
|
protected _connect(connectionType: SignalingConnectionType): void;
|
|
130
131
|
protected _disconnect(): void;
|
|
131
132
|
private _onOpen;
|
|
@@ -29,6 +29,7 @@ declare enum SignalingCommandType {
|
|
|
29
29
|
CHANGE_OPTIONS = "change-options",
|
|
30
30
|
GET_WAITING_HALL = "get-waiting-hall",
|
|
31
31
|
GET_PARTICIPANT_LIST_CHUNK = "get-participant-list-chunk",
|
|
32
|
+
GET_PARTICIPANTS = "get-participants",
|
|
32
33
|
PROMOTE_PARTICIPANT = "promote-participant",
|
|
33
34
|
REQUEST_TEST_MODE = "request-test-mode",
|
|
34
35
|
ADD_MOVIE = "add-movie",
|
package/package.json
CHANGED
package/static/Utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import UserType from '../enums/UserType';
|
|
2
|
-
import { ExternalParticipant } from '../types/ExternalId';
|
|
2
|
+
import { ExternalParticipant, ExternalParticipantListMarker } from '../types/ExternalId';
|
|
3
3
|
import { CompositeUserId, OkUserId, Participant, ParticipantId, ParticipantStateMapped } from '../types/Participant';
|
|
4
4
|
import SignalingMessage from '../types/SignalingMessage';
|
|
5
5
|
import VideoSettings from '../types/VideoSettings';
|
|
@@ -55,5 +55,10 @@ declare namespace Utils {
|
|
|
55
55
|
}): boolean;
|
|
56
56
|
function isArraysEquals<T>(arr1: T[], arr2: T[]): boolean;
|
|
57
57
|
function isEmptyObject(obj: object): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* @see https://wiki.odkl.ru/pages/viewpage.action?spaceKey=VIDEO&title=Signaling+API#SignalingAPI-Постраничныйвыводпартисипантов
|
|
60
|
+
* https://stash.odkl.ru/projects/ODKL/repos/odnoklassniki-webrtc/browse/src/main/java/one/webrtc/domain/conversation/ParticipantIndex.java#67-78
|
|
61
|
+
*/
|
|
62
|
+
function participantMarkerCompare(marker1: ExternalParticipantListMarker | undefined, marker2: ExternalParticipantListMarker | undefined): number;
|
|
58
63
|
}
|
|
59
64
|
export default Utils;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/types/Participant.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import ParticipantState from '../enums/ParticipantState';
|
|
|
3
3
|
import UserRole from '../enums/UserRole';
|
|
4
4
|
import { ParticipantStatus } from '../static/External';
|
|
5
5
|
import MediaSettings from '../types/MediaSettings';
|
|
6
|
-
import { ExternalParticipantId, ExternalParticipantListMarkers } from './ExternalId';
|
|
6
|
+
import { ExternalId, ExternalParticipantId, ExternalParticipantListMarkers } from './ExternalId';
|
|
7
7
|
import MuteStates from './MuteStates';
|
|
8
8
|
import ParticipantLayout from './ParticipantLayout';
|
|
9
9
|
/**
|
|
@@ -56,3 +56,6 @@ export interface Participant {
|
|
|
56
56
|
observedIds: CompositeUserId[];
|
|
57
57
|
markers?: ExternalParticipantListMarkers;
|
|
58
58
|
}
|
|
59
|
+
export interface IGetParticipantsParameters {
|
|
60
|
+
externalIds: ExternalId[];
|
|
61
|
+
}
|
|
@@ -12,7 +12,7 @@ import MediaSettings from './MediaSettings';
|
|
|
12
12
|
import MuteStates from './MuteStates';
|
|
13
13
|
import { CompositeUserId, OkUserId, ParticipantId, ParticipantListMarker as ParticipantParticipantListMarker, ParticipantListMarkers, ParticipantListType as ParticipantParticipantListType } from './Participant';
|
|
14
14
|
import VideoSettings from './VideoSettings';
|
|
15
|
-
import {
|
|
15
|
+
import { ChatRoom } from './WaitingHall';
|
|
16
16
|
declare type SignalingMessage = Record<string, any>;
|
|
17
17
|
export declare type RecordInfo = {
|
|
18
18
|
initiator: ParticipantId;
|
|
@@ -240,11 +240,11 @@ declare namespace SignalingMessage {
|
|
|
240
240
|
}
|
|
241
241
|
export interface ChatRoomUpdated extends Notification {
|
|
242
242
|
eventType: ChatRoomEventType;
|
|
243
|
-
totalCount:
|
|
244
|
-
firstParticipants
|
|
245
|
-
addedParticipantIds
|
|
246
|
-
removedParticipantIds
|
|
247
|
-
feedback
|
|
243
|
+
totalCount: ChatRoom['totalCount'];
|
|
244
|
+
firstParticipants?: ChatRoom['firstParticipants'];
|
|
245
|
+
addedParticipantIds?: ParticipantId[];
|
|
246
|
+
removedParticipantIds?: ParticipantId[];
|
|
247
|
+
feedback?: ChatRoom['feedback'];
|
|
248
248
|
}
|
|
249
249
|
export interface VideoQualityUpdate extends Notification {
|
|
250
250
|
quality: {
|
|
@@ -268,6 +268,7 @@ declare namespace SignalingMessage {
|
|
|
268
268
|
peerId: PeerId;
|
|
269
269
|
mediaModifiers: MediaModifiers;
|
|
270
270
|
participants?: ParticipantListChunk;
|
|
271
|
+
chatRoom?: ChatRoom;
|
|
271
272
|
}
|
|
272
273
|
export {};
|
|
273
274
|
}
|
package/types/WaitingHall.d.ts
CHANGED
|
@@ -9,6 +9,19 @@ export declare type WaitingParticipant = {
|
|
|
9
9
|
id: WaitingParticipantId;
|
|
10
10
|
externalId?: SignalingMessage.ExternalId;
|
|
11
11
|
};
|
|
12
|
+
export declare type Feedback = {
|
|
13
|
+
key: string;
|
|
14
|
+
totalCount: number;
|
|
15
|
+
currentCount: number;
|
|
16
|
+
timeout: number;
|
|
17
|
+
participantIds: CompositeUserId[];
|
|
18
|
+
};
|
|
19
|
+
export declare type ChatRoom = {
|
|
20
|
+
totalCount: number;
|
|
21
|
+
firstParticipants?: WaitingParticipant[];
|
|
22
|
+
handCount?: number;
|
|
23
|
+
feedback?: Feedback[];
|
|
24
|
+
};
|
|
12
25
|
/**
|
|
13
26
|
* Ответ на запрос `getWaitingHall`
|
|
14
27
|
*/
|