@vkontakte/calls-sdk 2.8.6-dev.591b2e38.0 → 2.8.6-dev.5b48b898.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 +15 -3
- package/abstract/BaseApi.d.ts +2 -1
- package/abstract/BaseSignaling.d.ts +2 -1
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +7 -7
- package/classes/Conversation.d.ts +5 -5
- package/default/Api.d.ts +2 -1
- package/default/Signaling.d.ts +2 -1
- package/package.json +1 -1
- package/static/Params.d.ts +0 -7
- package/types/Conversation.d.ts +28 -1
- package/types/ExternalId.d.ts +1 -0
- package/types/FastStart.d.ts +46 -0
- package/types/SignalingMessage.d.ts +1 -0
|
@@ -3,7 +3,6 @@ import type { RGBTuple } from '@vkontakte/calls-vmoji';
|
|
|
3
3
|
import BaseApi from '../abstract/BaseApi';
|
|
4
4
|
import BaseLogger from '../abstract/BaseLogger';
|
|
5
5
|
import { AddParticipantParams } from '../abstract/BaseSignaling';
|
|
6
|
-
import CallType from '../enums/CallType';
|
|
7
6
|
import ConversationFeature from '../enums/ConversationFeature';
|
|
8
7
|
import ConversationOption from '../enums/ConversationOption';
|
|
9
8
|
import MediaOption from '../enums/MediaOption';
|
|
@@ -13,13 +12,13 @@ import UserType from '../enums/UserType';
|
|
|
13
12
|
import { JSONObject } from '../static/Json';
|
|
14
13
|
import { IAsrStartParams, IAsrStopParams } from '../types/Asr';
|
|
15
14
|
import { AudienceModeHandsResponse } from '../types/AudienceMode';
|
|
16
|
-
import { ConversationData } from '../types/Conversation';
|
|
15
|
+
import { ConversationData, ConversationOnStartParams } from '../types/Conversation';
|
|
17
16
|
import { ExternalId, ExternalParticipant, ExternalParticipantId, ExternalParticipantListChunk, ExternalUserId } from '../types/ExternalId';
|
|
18
17
|
import MediaModifiers from '../types/MediaModifiers';
|
|
19
18
|
import { IVideoDimentions } from '../types/MediaSettings';
|
|
20
19
|
import { IAddMovieParams, IUpdateMovieData } from '../types/MovieShare';
|
|
21
20
|
import MuteStates from '../types/MuteStates';
|
|
22
|
-
import { CompositeUserId, IGetParticipantsParameters,
|
|
21
|
+
import { CompositeUserId, IGetParticipantsParameters, ParticipantId, ParticipantStateData } from '../types/Participant';
|
|
23
22
|
import { ParticipantLayout } from '../types/ParticipantLayout';
|
|
24
23
|
import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
|
|
25
24
|
import ParticipantPriority from '../types/ParticipantPriority';
|
|
@@ -66,7 +65,7 @@ export default class Conversation extends EventEmitter {
|
|
|
66
65
|
static current(): Conversation | null;
|
|
67
66
|
static hangupAfterInit(): void;
|
|
68
67
|
static id(): string | null;
|
|
69
|
-
onStart(opponentIds
|
|
68
|
+
onStart({ opponentIds, opponentType, mediaOptions, payload, joiningAllowed, requireAuthToJoin, onlyAdminCanShareMovie, externalIds, onFastStart }: ConversationOnStartParams): Promise<ConversationData>;
|
|
70
69
|
onJoin(joinArgs: {
|
|
71
70
|
conversationId?: string;
|
|
72
71
|
mediaOptions: MediaOption[];
|
|
@@ -90,7 +89,8 @@ export default class Conversation extends EventEmitter {
|
|
|
90
89
|
accept(mediaOptions: MediaOption[]): Promise<ConversationData>;
|
|
91
90
|
decline(): Promise<void>;
|
|
92
91
|
hangup(): Promise<void>;
|
|
93
|
-
addParticipant(participantIds:
|
|
92
|
+
addParticipant(participantIds: ExternalId[], params?: AddParticipantParams): Promise<void>;
|
|
93
|
+
addParticipantLegacy(participantIds: CompositeUserId[], params?: AddParticipantParams): Promise<void>;
|
|
94
94
|
removeParticipant(participantId: CompositeUserId, ban?: boolean): Promise<void>;
|
|
95
95
|
setVolume(volume: number): void;
|
|
96
96
|
updateStatisticsInterval(): void;
|
package/default/Api.d.ts
CHANGED
|
@@ -26,8 +26,9 @@ export default class Api extends BaseApi {
|
|
|
26
26
|
}, speakerIds?: OkUserId[]): Promise<ConversationResponse>;
|
|
27
27
|
startConversation(conversationId: string, ids?: OkUserId[], type?: CallType, isVideo?: boolean, payload?: string, joiningAllowed?: boolean, requireAuthToJoin?: boolean, { onlyAdminCanShareMovie }?: {
|
|
28
28
|
onlyAdminCanShareMovie?: boolean;
|
|
29
|
-
}): Promise<ConversationResponse>;
|
|
29
|
+
}, externalIds?: ExternalId[]): Promise<ConversationResponse>;
|
|
30
30
|
protected _ensureUuid(): void;
|
|
31
|
+
deviceId(): string;
|
|
31
32
|
private _preareStartConversationData;
|
|
32
33
|
private _startConversation;
|
|
33
34
|
createJoinLink(conversationId: string): Promise<{
|
package/default/Signaling.d.ts
CHANGED
|
@@ -88,7 +88,8 @@ export default class Signaling extends BaseSignaling {
|
|
|
88
88
|
changeMediaSettings(mediaSettings: MediaSettings): Promise<SignalingMessage>;
|
|
89
89
|
changeParticipantState(state: ParticipantStateData, compositeUserId?: CompositeUserId): Promise<SignalingMessage>;
|
|
90
90
|
putHandsDown(): Promise<SignalingMessage>;
|
|
91
|
-
addParticipant(
|
|
91
|
+
addParticipant(externalIds: CompositeUserId[], params?: AddParticipantParams): Promise<SignalingMessage>;
|
|
92
|
+
addParticipantLegacy(participantIds: CompositeUserId[], params?: AddParticipantParams): Promise<SignalingMessage>;
|
|
92
93
|
removeParticipant(participantId: CompositeUserId, ban?: boolean): Promise<SignalingMessage>;
|
|
93
94
|
allocateConsumer(description: RTCSessionDescription | null, capabilities: {
|
|
94
95
|
[key: string]: number | boolean | string;
|
package/package.json
CHANGED
package/static/Params.d.ts
CHANGED
|
@@ -849,12 +849,6 @@ export type ParamsObject = {
|
|
|
849
849
|
* _По умолчанию: `false`_
|
|
850
850
|
*/
|
|
851
851
|
simulcast: boolean;
|
|
852
|
-
/**
|
|
853
|
-
* Не запрашивать conversation params при входе в звонок
|
|
854
|
-
*
|
|
855
|
-
* _По умолчанию: `false`_
|
|
856
|
-
*/
|
|
857
|
-
skipConversationParams?: boolean;
|
|
858
852
|
};
|
|
859
853
|
export default abstract class Params {
|
|
860
854
|
private static _params;
|
|
@@ -984,7 +978,6 @@ export default abstract class Params {
|
|
|
984
978
|
static get enableVideoEffectsFpsDegradation(): boolean;
|
|
985
979
|
static get simulcast(): boolean;
|
|
986
980
|
static set simulcast(value: boolean);
|
|
987
|
-
static get skipConversationParams(): boolean | undefined;
|
|
988
981
|
static toJSON(): {
|
|
989
982
|
apiKey: string;
|
|
990
983
|
apiEnv: string;
|
package/types/Conversation.d.ts
CHANGED
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import { TransportTopology } from '../classes/transport/Transport';
|
|
2
2
|
import CallDirection from '../enums/CallDirection';
|
|
3
|
+
import CallType from '../enums/CallType';
|
|
3
4
|
import ConversationFeature from '../enums/ConversationFeature';
|
|
4
5
|
import ConversationOption from '../enums/ConversationOption';
|
|
6
|
+
import MediaOption from '../enums/MediaOption';
|
|
5
7
|
import UserRole from '../enums/UserRole';
|
|
6
8
|
import { AsrInfo } from './Asr';
|
|
7
9
|
import { IFeaturesPerRole } from './ConversationFeature';
|
|
8
|
-
import { ExternalParticipantId } from './ExternalId';
|
|
10
|
+
import { ExternalId, ExternalParticipantId } from './ExternalId';
|
|
11
|
+
import { FastStartHandler } from './FastStart';
|
|
9
12
|
import MediaModifiers from './MediaModifiers';
|
|
10
13
|
import MuteStates from './MuteStates';
|
|
11
14
|
import { OkUserId, ParticipantId } from './Participant';
|
|
@@ -68,3 +71,27 @@ export type ConversationData = {
|
|
|
68
71
|
/** @hidden */
|
|
69
72
|
urlSharingInfoByRoom: Map<IRoomId, RoomUrlSharingInfo>;
|
|
70
73
|
};
|
|
74
|
+
export type ConversationOnStartParams = {
|
|
75
|
+
opponentIds?: OkUserId[];
|
|
76
|
+
opponentType: CallType;
|
|
77
|
+
mediaOptions: MediaOption[];
|
|
78
|
+
payload?: string;
|
|
79
|
+
joiningAllowed?: boolean;
|
|
80
|
+
requireAuthToJoin?: boolean;
|
|
81
|
+
onlyAdminCanShareMovie?: boolean;
|
|
82
|
+
externalIds?: ExternalId[];
|
|
83
|
+
onFastStart?: FastStartHandler;
|
|
84
|
+
};
|
|
85
|
+
export type StartConversationParams = {
|
|
86
|
+
opponentIds?: OkUserId[];
|
|
87
|
+
opponentType: CallType;
|
|
88
|
+
direction: CallDirection;
|
|
89
|
+
mediaOptions: MediaOption[];
|
|
90
|
+
payload?: string;
|
|
91
|
+
joiningAllowed?: boolean;
|
|
92
|
+
requireAuthToJoin?: boolean;
|
|
93
|
+
onlyAdminCanShareMovie?: boolean;
|
|
94
|
+
externalIds?: ExternalId[];
|
|
95
|
+
startedTime: number;
|
|
96
|
+
onFastStart?: FastStartHandler;
|
|
97
|
+
};
|
package/types/ExternalId.d.ts
CHANGED
|
@@ -19,6 +19,7 @@ export declare namespace ExternalIdUtils {
|
|
|
19
19
|
function fromId(id: ExternalUserId, type?: ExternalIdType, deviceIdx?: number): ExternalParticipantId;
|
|
20
20
|
function fromSignalingParticipant(participant: SignalingMessage.Participant, useDecorative?: boolean): ExternalParticipantId | undefined;
|
|
21
21
|
function fromSignaling(signalingId: SignalingMessage.ExternalId, deviceIdx?: number): ExternalParticipantId;
|
|
22
|
+
function toSignaling(externalId: ExternalId): string;
|
|
22
23
|
function toString(externalId: ExternalId): ExternalIdString;
|
|
23
24
|
function fromIdToString(id: ExternalUserId, type?: ExternalIdType, deviceIdx?: number): ExternalIdString;
|
|
24
25
|
function fromString(stringId: ExternalIdString): ExternalParticipantId;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { HangupType, IceServer } from '../CallsSDK';
|
|
2
|
+
import CallType from '../enums/CallType';
|
|
3
|
+
import MediaOption from '../enums/MediaOption';
|
|
4
|
+
import { ExternalId } from './ExternalId';
|
|
5
|
+
/**
|
|
6
|
+
* Параметры, которые нужно вернуть для создания fastStart
|
|
7
|
+
*/
|
|
8
|
+
export interface InternalParams {
|
|
9
|
+
platform: string;
|
|
10
|
+
sdkVersion: string;
|
|
11
|
+
clientAppKey: string;
|
|
12
|
+
deviceId: string;
|
|
13
|
+
protocolVersion: number;
|
|
14
|
+
domainId?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface InternalCallerParams {
|
|
17
|
+
id: ID;
|
|
18
|
+
isConcurrent: boolean;
|
|
19
|
+
endpoint: string;
|
|
20
|
+
wtEndpoint: string;
|
|
21
|
+
clientType: string;
|
|
22
|
+
turn: IceServer;
|
|
23
|
+
stun: IceServer;
|
|
24
|
+
}
|
|
25
|
+
export interface ID {
|
|
26
|
+
internal: number;
|
|
27
|
+
external: string;
|
|
28
|
+
}
|
|
29
|
+
export interface FastStartParams {
|
|
30
|
+
conversationId: string;
|
|
31
|
+
internalParams: string;
|
|
32
|
+
externalIds?: ExternalId[];
|
|
33
|
+
opponentType: CallType;
|
|
34
|
+
mediaOptions: MediaOption[];
|
|
35
|
+
joiningAllowed?: boolean;
|
|
36
|
+
requireAuthToJoin?: boolean;
|
|
37
|
+
isVideo?: boolean;
|
|
38
|
+
}
|
|
39
|
+
export interface FastStartResponse {
|
|
40
|
+
internalCallerParams: string;
|
|
41
|
+
rejectedParticipants: {
|
|
42
|
+
id: string;
|
|
43
|
+
status: HangupType;
|
|
44
|
+
}[];
|
|
45
|
+
}
|
|
46
|
+
export type FastStartHandler = (params: FastStartParams) => Promise<FastStartResponse>;
|