@vkontakte/calls-sdk 2.5.2-dev.93eddf8.0 → 2.5.2-dev.ad56400.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 +2 -2
- package/abstract/BaseApi.d.ts +2 -2
- package/calls-sdk.cjs.js +8 -8
- package/calls-sdk.esm.js +8 -8
- package/classes/Conversation.d.ts +5 -1
- package/classes/MediaSource.d.ts +2 -2
- package/classes/transport/DirectTransport.d.ts +1 -0
- package/classes/transport/PerfStatReporter.d.ts +9 -1
- package/classes/transport/ServerTransport.d.ts +2 -1
- package/classes/transport/Statistics.d.ts +8 -1
- package/classes/transport/Transport.d.ts +1 -1
- package/default/Api.d.ts +2 -2
- package/package.json +1 -1
- package/static/Params.d.ts +1 -2
- package/static/WebRTCUtils.d.ts +5 -1
- package/types/ExternalId.d.ts +1 -0
- package/types/ParticipantLayout.d.ts +0 -4
|
@@ -12,7 +12,7 @@ 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 } from '../types/ExternalId';
|
|
15
|
+
import { ExternalParticipantId, 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';
|
|
@@ -62,6 +62,7 @@ export declare type ConversationData = {
|
|
|
62
62
|
unmuteOptions: MediaOption[];
|
|
63
63
|
networkRating: number;
|
|
64
64
|
waitingHall: boolean;
|
|
65
|
+
observer: boolean;
|
|
65
66
|
};
|
|
66
67
|
export declare type ParticipantUpdateInfo = {
|
|
67
68
|
participantStreamDescription: ParticipantStreamDescription | null;
|
|
@@ -110,6 +111,7 @@ export default class Conversation extends EventEmitter {
|
|
|
110
111
|
mediaOptions: MediaOption[];
|
|
111
112
|
chatId?: string;
|
|
112
113
|
joinLink?: string;
|
|
114
|
+
observedIds?: ExternalUserId[];
|
|
113
115
|
}): Promise<ConversationData>;
|
|
114
116
|
private _onJoinPart2;
|
|
115
117
|
onPush(conversationId: string, type?: UserType, peerId?: number): Promise<void>;
|
|
@@ -179,6 +181,7 @@ export default class Conversation extends EventEmitter {
|
|
|
179
181
|
changeParticipantState(state: {
|
|
180
182
|
[key: string]: string;
|
|
181
183
|
}): Promise<void>;
|
|
184
|
+
requestKeyFrame(participantStreamDescription: ParticipantStreamDescription): Promise<void | SignalingMessage>;
|
|
182
185
|
updateDisplayLayout(layouts: ParticipantLayout[]): Promise<void>;
|
|
183
186
|
private _stopStreaming;
|
|
184
187
|
private _sendUpdateDisplayLayout;
|
|
@@ -232,6 +235,7 @@ export default class Conversation extends EventEmitter {
|
|
|
232
235
|
private _onScreenSharingStatus;
|
|
233
236
|
private _changeRemoteMediaSettings;
|
|
234
237
|
private _changeRemoteParticipantState;
|
|
238
|
+
private _invokeRolesChangedCallbackIfNeeded;
|
|
235
239
|
private _onSignalingNotification;
|
|
236
240
|
private _onSignalingReconnect;
|
|
237
241
|
private _onSignalingFailed;
|
package/classes/MediaSource.d.ts
CHANGED
|
@@ -27,12 +27,12 @@ export declare class MediaSource extends EventEmitter {
|
|
|
27
27
|
private _videoStatusOnScreenCapturingEnabled;
|
|
28
28
|
private _effect;
|
|
29
29
|
constructor();
|
|
30
|
-
request(mediaOptions?: MediaOption[]): Promise<void>;
|
|
30
|
+
request(mediaOptions?: MediaOption[], needEmptyTracks?: boolean): Promise<void>;
|
|
31
31
|
getStream(): MediaStream | null;
|
|
32
32
|
getScreenTrack(): MediaStreamTrack | null;
|
|
33
33
|
getSendVideoTrack(noDataChannel?: boolean): MediaStreamTrack | null;
|
|
34
34
|
private _getSendAudioTrack;
|
|
35
|
-
addTrackToPeerConnection(pc: RTCPeerConnection, noDataChannel?: boolean): void;
|
|
35
|
+
addTrackToPeerConnection(pc: RTCPeerConnection, observer?: boolean, noDataChannel?: boolean): void;
|
|
36
36
|
getMediaSettings(): MediaSettings;
|
|
37
37
|
changeDevice(kind: MediaDeviceKind): Promise<void>;
|
|
38
38
|
/**
|
|
@@ -30,6 +30,7 @@ export default class DirectTransport extends EventEmitter {
|
|
|
30
30
|
private _lastNetworkStat;
|
|
31
31
|
private _remoteNetworkStat;
|
|
32
32
|
private _networkLimits;
|
|
33
|
+
private _perfStatReporter;
|
|
33
34
|
constructor(participantId: ParticipantId, isMaster: boolean, signaling: BaseSignaling, mediaSource: MediaSource, serverSettings: ServerSettings);
|
|
34
35
|
getState(): TransportState;
|
|
35
36
|
updateStatisticsInterval(): void;
|
|
@@ -17,13 +17,21 @@ export declare type CallStarReport = {
|
|
|
17
17
|
jitter_video: number;
|
|
18
18
|
jitter_audio: number;
|
|
19
19
|
interframe_delay_variance: number;
|
|
20
|
+
total_audio_energy: number;
|
|
21
|
+
total_audio_samples_received: number;
|
|
22
|
+
inserted_audio_samples_for_deceleration: number;
|
|
23
|
+
removed_audio_samples_for_acceleration: number;
|
|
24
|
+
concealed_audio_samples: number;
|
|
25
|
+
silent_concealed_audio_samples: number;
|
|
26
|
+
audio_concealment_events: number;
|
|
20
27
|
};
|
|
21
28
|
export default class PerfStatReporter extends EventEmitter {
|
|
22
29
|
private _previousTimestamp;
|
|
23
30
|
private _previousCallStatReportTimestamp;
|
|
24
31
|
private _previousCallStatReport;
|
|
25
32
|
private _signaling;
|
|
26
|
-
|
|
33
|
+
private readonly _directTopology;
|
|
34
|
+
constructor(transport: ServerTransport | DirectTransport, signaling: BaseSignaling, directTopology?: boolean);
|
|
27
35
|
destroy(): void;
|
|
28
36
|
static getEstimatedPerformanceIndex(): number;
|
|
29
37
|
private _handleStats;
|
|
@@ -14,6 +14,7 @@ export default class ServerTransport extends EventEmitter {
|
|
|
14
14
|
private _producerScreen;
|
|
15
15
|
private _consumerScreen;
|
|
16
16
|
private _isOpen;
|
|
17
|
+
private _observer;
|
|
17
18
|
private _reconnectionPrevented;
|
|
18
19
|
private _state;
|
|
19
20
|
private _statInterval;
|
|
@@ -35,7 +36,7 @@ export default class ServerTransport extends EventEmitter {
|
|
|
35
36
|
constructor(signaling: BaseSignaling, mediaSource: MediaSource, serverSettings: ServerSettings);
|
|
36
37
|
getState(): TransportState;
|
|
37
38
|
updateStatisticsInterval(): void;
|
|
38
|
-
open(): void;
|
|
39
|
+
open(observer?: boolean): void;
|
|
39
40
|
close(error?: Error): void;
|
|
40
41
|
removeParticipant(participantId: ParticipantId): void;
|
|
41
42
|
preventRestart(): void;
|
|
@@ -31,7 +31,14 @@ export declare type StatRtp = {
|
|
|
31
31
|
framesReceived?: number;
|
|
32
32
|
framesDropped?: number;
|
|
33
33
|
framesDroppedDelta?: number;
|
|
34
|
-
interframeDelayVariance
|
|
34
|
+
interframeDelayVariance?: number;
|
|
35
|
+
totalSamplesReceived?: number;
|
|
36
|
+
concealedSamples?: number;
|
|
37
|
+
insertedSamplesForDeceleration?: number;
|
|
38
|
+
removedSamplesForAcceleration?: number;
|
|
39
|
+
silentConcealedSamples?: number;
|
|
40
|
+
concealmentEvents?: number;
|
|
41
|
+
totalAudioEnergy?: number;
|
|
35
42
|
};
|
|
36
43
|
export declare type StatItem = {
|
|
37
44
|
timestamp: number;
|
|
@@ -49,7 +49,7 @@ export declare class Transport extends EventEmitter {
|
|
|
49
49
|
updateSettings(settings: ServerSettings): void;
|
|
50
50
|
updateStatisticsInterval(): void;
|
|
51
51
|
allocate(participantId: ParticipantId, isMaster?: boolean): void;
|
|
52
|
-
open(participantIds: ParticipantId[], peerId?: string | null): void;
|
|
52
|
+
open(participantIds: ParticipantId[], peerId?: string | null, observer?: boolean): void;
|
|
53
53
|
close(participantId: ParticipantId): void;
|
|
54
54
|
destroy(): void;
|
|
55
55
|
getTopology(): TransportTopology;
|
package/default/Api.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import BaseApi, { LogItem } from '../abstract/BaseApi';
|
|
|
2
2
|
import CallType from '../enums/CallType';
|
|
3
3
|
import ConversationParams from '../types/ConversationParams';
|
|
4
4
|
import ConversationResponse from '../types/ConversationResponse';
|
|
5
|
-
import { ExternalId } from '../types/ExternalId';
|
|
5
|
+
import { ExternalId, ExternalUserId } from '../types/ExternalId';
|
|
6
6
|
import { CompositeUserId, OkUserId } from '../types/Participant';
|
|
7
7
|
export default class Api extends BaseApi {
|
|
8
8
|
private _userId;
|
|
@@ -26,7 +26,7 @@ export default class Api extends BaseApi {
|
|
|
26
26
|
success: boolean;
|
|
27
27
|
}>;
|
|
28
28
|
getAnonymTokenByLink(joinLink: string, username?: string): Promise<string>;
|
|
29
|
-
joinConversationByLink(joinLink: string, isVideo?: boolean): Promise<ConversationResponse>;
|
|
29
|
+
joinConversationByLink(joinLink: string, isVideo?: boolean, observedIds?: ExternalUserId[]): Promise<ConversationResponse>;
|
|
30
30
|
/**
|
|
31
31
|
* NB: Не сохраняет порядок возвращаемых ID
|
|
32
32
|
* @hidden
|
package/package.json
CHANGED
package/static/Params.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export declare type ParamsObject = {
|
|
|
28
28
|
* API ключ приложения
|
|
29
29
|
*/
|
|
30
30
|
apiKey: string;
|
|
31
|
-
apiEnv?: 'AUTO' | 'PROD' | 'TEST' | 'VIDEOTEST' | string;
|
|
31
|
+
apiEnv?: 'AUTO' | 'PROD' | 'PROD_OK' | 'TEST' | 'VIDEOTEST' | string;
|
|
32
32
|
apiAuth?: typeof AuthData;
|
|
33
33
|
/**
|
|
34
34
|
* Токен авторизации
|
|
@@ -427,7 +427,6 @@ export default abstract class Params {
|
|
|
427
427
|
static get clientType(): string;
|
|
428
428
|
static set clientType(value: string);
|
|
429
429
|
static get device(): string;
|
|
430
|
-
static get apiAppId(): number;
|
|
431
430
|
static get apiKey(): string;
|
|
432
431
|
static get apiEnv(): string;
|
|
433
432
|
static get apiEndpoint(): string;
|
package/static/WebRTCUtils.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ declare namespace WebRTCUtils {
|
|
|
62
62
|
/**
|
|
63
63
|
* Запрашивает камеру и микрофон пользователя
|
|
64
64
|
*/
|
|
65
|
-
function getUserMedia(needVideo?: boolean, needAudio?: boolean): Promise<MediaStream>;
|
|
65
|
+
function getUserMedia(needVideo?: boolean, needAudio?: boolean, needEmptyTracks?: boolean): Promise<MediaStream>;
|
|
66
66
|
/**
|
|
67
67
|
* Запрашивает трансляцию экрана пользователя
|
|
68
68
|
*/
|
|
@@ -141,5 +141,9 @@ declare namespace WebRTCUtils {
|
|
|
141
141
|
* Возвращает AudioContext
|
|
142
142
|
*/
|
|
143
143
|
function getAudioContext(): AudioContext;
|
|
144
|
+
/**
|
|
145
|
+
* Возвращает подверсию браузера (если она есть)
|
|
146
|
+
*/
|
|
147
|
+
function browserSubVersion(): string;
|
|
144
148
|
}
|
|
145
149
|
export default WebRTCUtils;
|
package/types/ExternalId.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export declare enum ExternalIdType {
|
|
|
12
12
|
ANONYM = "ANONYM",
|
|
13
13
|
GROUP = "GROUP"
|
|
14
14
|
}
|
|
15
|
+
export declare type ExternalUserId = string;
|
|
15
16
|
export declare namespace ExternalIdUtils {
|
|
16
17
|
function fromIds(ids: (string | ExternalId)[]): ExternalId[];
|
|
17
18
|
function fromId(id: string, type?: ExternalIdType): ExternalId;
|
|
@@ -21,10 +21,6 @@ export declare type Layout = {
|
|
|
21
21
|
* Поддерживаемые значения: `cv` и `cn`, что соответствует CSS `cover` и `contain`
|
|
22
22
|
*/
|
|
23
23
|
fit: string;
|
|
24
|
-
/**
|
|
25
|
-
* Запрос опорного кадра, нужно не злоупотреблять, негативно влияет на качество видео
|
|
26
|
-
*/
|
|
27
|
-
keyFrame: boolean;
|
|
28
24
|
};
|
|
29
25
|
/**
|
|
30
26
|
* Запрос остановки стрима
|