@vkontakte/calls-sdk 2.8.11-dev.7ac19827.0 → 2.8.11-dev.c08ac4e9.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 +9 -3
- package/abstract/BaseApi.d.ts +1 -1
- package/calls-sdk.cjs.js +16 -13
- package/calls-sdk.esm.js +11298 -13
- package/classes/Conversation.d.ts +3 -1
- package/classes/DisplayLayoutRequester.d.ts +32 -0
- package/classes/Logger.d.ts +4 -4
- package/default/Signaling.d.ts +42 -26
- package/package.json +1 -1
- package/static/Debug.d.ts +4 -4
- package/static/Params.d.ts +8 -0
- package/types/ParticipantLayout.d.ts +33 -0
- package/types/PerfStatReporter.d.ts +2 -1
- package/types/WebTransport.d.ts +0 -4
- package/classes/ConversationResponseValidator.d.ts +0 -3
- package/default/SignalingTransport.d.ts +0 -68
|
@@ -20,7 +20,7 @@ import { IVideoDimentions } from '../types/MediaSettings';
|
|
|
20
20
|
import { IAddMovieParams, IUpdateMovieData } from '../types/MovieShare';
|
|
21
21
|
import MuteStates from '../types/MuteStates';
|
|
22
22
|
import { CompositeUserId, IGetParticipantsParameters, ParticipantId, ParticipantStateData } from '../types/Participant';
|
|
23
|
-
import { ParticipantLayout } from '../types/ParticipantLayout';
|
|
23
|
+
import { DisplayLayoutRequest, ParticipantLayout } from '../types/ParticipantLayout';
|
|
24
24
|
import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
|
|
25
25
|
import ParticipantPriority from '../types/ParticipantPriority';
|
|
26
26
|
import { ParticipantStreamDescription } from '../types/ParticipantStreamDescription';
|
|
@@ -32,6 +32,7 @@ export default class Conversation extends EventEmitter {
|
|
|
32
32
|
private readonly _api;
|
|
33
33
|
private readonly _signaling;
|
|
34
34
|
private readonly _signalingActor;
|
|
35
|
+
private readonly _displayLayoutRequester;
|
|
35
36
|
private _mediaSource;
|
|
36
37
|
private _conversation;
|
|
37
38
|
private _myLastRequestedLayouts;
|
|
@@ -204,6 +205,7 @@ export default class Conversation extends EventEmitter {
|
|
|
204
205
|
requestKeyFrame(participantStreamDescription: ParticipantStreamDescription): Promise<void | SignalingMessage>;
|
|
205
206
|
requestTestMode(consumerCommand: string, producerCommand: string): Promise<void>;
|
|
206
207
|
updateDisplayLayout(layouts: ParticipantLayout[]): Promise<void>;
|
|
208
|
+
requestDisplayLayout(requests: DisplayLayoutRequest[]): Promise<void>;
|
|
207
209
|
feedback(key: string): Promise<SignalingMessage>;
|
|
208
210
|
userFeedbackStats(userResponse: number, reason?: string, groupCallUsersCount?: number): void;
|
|
209
211
|
sendClientEvent(eventType: string, eventData?: Record<string, string | number | boolean>, immediately?: boolean): void;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import BaseApi from '../abstract/BaseApi';
|
|
2
|
+
import { DisplayLayoutRequest, ParticipantLayout } from '../types/ParticipantLayout';
|
|
3
|
+
import { Participant, ParticipantId } from '../types/Participant';
|
|
4
|
+
type DisplayLayoutRequesterParams = {
|
|
5
|
+
api: BaseApi;
|
|
6
|
+
getParticipants: () => Promise<Record<ParticipantId, Participant>>;
|
|
7
|
+
isMe: (participantId: ParticipantId) => boolean;
|
|
8
|
+
updateDisplayLayout: (layouts: ParticipantLayout[]) => Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
export default class DisplayLayoutRequester {
|
|
11
|
+
private readonly _api;
|
|
12
|
+
private readonly _getParticipants;
|
|
13
|
+
private readonly _isMe;
|
|
14
|
+
private readonly _updateDisplayLayout;
|
|
15
|
+
private _requestedLayouts;
|
|
16
|
+
private _pendingRequests;
|
|
17
|
+
private _pendingPromises;
|
|
18
|
+
private _timer;
|
|
19
|
+
private _inFlight;
|
|
20
|
+
private _lastFlushAt;
|
|
21
|
+
private _generation;
|
|
22
|
+
constructor({ api, getParticipants, isMe, updateDisplayLayout }: DisplayLayoutRequesterParams);
|
|
23
|
+
request(requests: DisplayLayoutRequest[]): Promise<void>;
|
|
24
|
+
cleanupParticipant(participantId: ParticipantId): void;
|
|
25
|
+
clear(): void;
|
|
26
|
+
private _schedule;
|
|
27
|
+
private _flush;
|
|
28
|
+
private _getRequestLayouts;
|
|
29
|
+
private _getDiff;
|
|
30
|
+
private _isChanged;
|
|
31
|
+
}
|
|
32
|
+
export {};
|
package/classes/Logger.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ export default class Logger extends BaseLogger {
|
|
|
10
10
|
static setConversationIdProvider(provider: () => string | null): void;
|
|
11
11
|
static create(api: BaseApi, externalLogger: BaseLogger | null): void;
|
|
12
12
|
static log(name: StatLog, value?: string, immediately?: boolean): void;
|
|
13
|
-
static logClientStats(params: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
14
|
-
static logClientEvent(params: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
13
|
+
static logClientStats(params: Record<string, string | number | boolean | undefined | null>, immediately?: boolean): void;
|
|
14
|
+
static logClientEvent(params: Record<string, string | number | boolean | undefined | null>, immediately?: boolean): void;
|
|
15
15
|
static destroy(): void;
|
|
16
16
|
private readonly _externalLogger;
|
|
17
17
|
private readonly _api;
|
|
@@ -22,8 +22,8 @@ export default class Logger extends BaseLogger {
|
|
|
22
22
|
private _serverTimeDelta;
|
|
23
23
|
constructor(api: BaseApi, externalLogger: BaseLogger | null);
|
|
24
24
|
log(name: StatLog, value?: string, immediately?: boolean): void;
|
|
25
|
-
logClientStats(data: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
26
|
-
logClientEvent(data: Record<string, string | number | undefined | null>, immediately?: boolean): void;
|
|
25
|
+
logClientStats(data: Record<string, string | number | boolean | undefined | null>, immediately?: boolean): void;
|
|
26
|
+
logClientEvent(data: Record<string, string | number | boolean | undefined | null>, immediately?: boolean): void;
|
|
27
27
|
destroy(): void;
|
|
28
28
|
private _getConversationId;
|
|
29
29
|
private _sendBatch;
|
package/default/Signaling.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ import { TransportTopology } from '../classes/transport/Transport';
|
|
|
5
5
|
import ConversationFeature from '../enums/ConversationFeature';
|
|
6
6
|
import ConversationOption from '../enums/ConversationOption';
|
|
7
7
|
import MediaOption from '../enums/MediaOption';
|
|
8
|
+
import SignalingCommandType from '../enums/SignalingCommandType';
|
|
8
9
|
import SignalingConnectionType from '../enums/SignalingConnectionType';
|
|
9
10
|
import UserRole from '../enums/UserRole';
|
|
10
11
|
import { JSONObject } from '../static/Json';
|
|
@@ -20,33 +21,41 @@ import ParticipantLayout, { RequestKeyFrame, StopStream } from '../types/Partici
|
|
|
20
21
|
import { ParticipantListChunkParameters } from '../types/ParticipantListChunk';
|
|
21
22
|
import { StreamDescriptionString } from '../types/ParticipantStreamDescription';
|
|
22
23
|
import { PerfStatReport } from '../types/PerfStatReporter';
|
|
23
|
-
import SignalingMessage, { GetParticipantsSignalingResponse, GetRoomsSignalingResponse } from '../types/SignalingMessage';
|
|
24
|
+
import SignalingMessage, { GetParticipantsSignalingResponse, GetRoomsSignalingResponse, SignalingSuccessResponse } from '../types/SignalingMessage';
|
|
24
25
|
import { IPublishStreamData, IRecordConfData, IStartStreamData, IStopStreamData } from '../types/Streams';
|
|
25
26
|
export default class Signaling extends BaseSignaling {
|
|
26
|
-
private
|
|
27
|
-
|
|
27
|
+
private socket;
|
|
28
|
+
protected sequence: number;
|
|
28
29
|
private lastStamp;
|
|
29
30
|
private websocketCommandsQueue;
|
|
30
31
|
private datachannelCommandsQueue;
|
|
31
32
|
private incomingCache;
|
|
32
33
|
private responseHandlers;
|
|
33
34
|
private connectionType;
|
|
34
|
-
private
|
|
35
|
-
private
|
|
35
|
+
private reconnectCount;
|
|
36
|
+
private endpoint;
|
|
37
|
+
private wtEndpoint;
|
|
38
|
+
protected conversationResolve: Function | null;
|
|
39
|
+
protected conversationReject: Function | null;
|
|
36
40
|
private connected;
|
|
37
41
|
private listenersReady;
|
|
38
|
-
|
|
39
|
-
|
|
42
|
+
protected peerId: number | null;
|
|
43
|
+
protected conversationId: string | null;
|
|
44
|
+
private reconnectTimer;
|
|
40
45
|
private connectionMessageWaitTimer;
|
|
46
|
+
private doctorTimer;
|
|
41
47
|
private participantIdRegistry;
|
|
42
48
|
private producerNotificationDataChannel;
|
|
43
49
|
private producerCommandDataChannel;
|
|
44
50
|
private producerCommandDataChannelEnabled;
|
|
45
51
|
private producerCommandSerializationService;
|
|
52
|
+
private static get RECONNECT_DELAY();
|
|
53
|
+
private static get RECONNECT_MAX_DELAY();
|
|
54
|
+
private static get RECONNECT_MAX_COUNT();
|
|
46
55
|
private static get WAIT_CONNECTION_DELAY();
|
|
47
56
|
private static get WAIT_RESPONSE_DELAY();
|
|
57
|
+
private static get WAIT_MESSAGE_DELAY();
|
|
48
58
|
get ready(): boolean;
|
|
49
|
-
setAbortSignal(signal: AbortSignal | undefined): void;
|
|
50
59
|
setEndpoint(endpoint: string): void;
|
|
51
60
|
setWebTransportEndpoint(endpoint: string | null): void;
|
|
52
61
|
setConversationId(conversationId: string): void;
|
|
@@ -62,6 +71,15 @@ export default class Signaling extends BaseSignaling {
|
|
|
62
71
|
* Open a connection with a signaling server
|
|
63
72
|
*/
|
|
64
73
|
connect(connectionType: SignalingConnectionType): Promise<SignalingMessage.Connection>;
|
|
74
|
+
/**
|
|
75
|
+
* Send a command to a signaling server
|
|
76
|
+
*/
|
|
77
|
+
protected _send<T extends SignalingSuccessResponse>(command: SignalingCommandType, params?: any, needResponse?: boolean, retryCount?: number): Promise<T>;
|
|
78
|
+
/**
|
|
79
|
+
* Send a raw command to a signaling server
|
|
80
|
+
*/
|
|
81
|
+
protected _sendRaw<T extends SignalingSuccessResponse>(command: SignalingCommandType, params?: any, needResponse?: boolean, retryCount?: number): Promise<T>;
|
|
82
|
+
private _isDataChannelCommand;
|
|
65
83
|
getNextCommandSequenceNumber(): number;
|
|
66
84
|
hangup(reason: string): Promise<SignalingMessage | void>;
|
|
67
85
|
sendCandidate(participantId: ParticipantId, candidate: RTCIceCandidate): Promise<SignalingMessage>;
|
|
@@ -145,36 +163,34 @@ export default class Signaling extends BaseSignaling {
|
|
|
145
163
|
startAsr(params: IAsrStartParams): Promise<SignalingMessage>;
|
|
146
164
|
stopAsr(params?: IAsrStopParams): Promise<SignalingMessage>;
|
|
147
165
|
requestAsr(request: boolean): Promise<SignalingMessage>;
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
private _send;
|
|
152
|
-
/**
|
|
153
|
-
* Send a raw command to a signaling server
|
|
154
|
-
*/
|
|
155
|
-
private _sendRaw;
|
|
156
|
-
private _isDataChannelCommand;
|
|
166
|
+
private _buildUrl;
|
|
167
|
+
protected _connect(connectionType: SignalingConnectionType, useWebTransport: boolean): void;
|
|
168
|
+
protected _disconnect(code?: number): void;
|
|
157
169
|
private _onOpen;
|
|
158
170
|
private _onMessage;
|
|
159
|
-
|
|
171
|
+
protected _handleMessage(message: SignalingMessage): void;
|
|
160
172
|
private _handleErrorMessage;
|
|
161
|
-
|
|
173
|
+
protected _handleCachedMessages(): void;
|
|
162
174
|
private _throwError;
|
|
163
175
|
private _onError;
|
|
164
176
|
private _serializeErrorEvent;
|
|
165
|
-
|
|
166
|
-
|
|
177
|
+
protected _onClose(event: CloseEvent): void;
|
|
178
|
+
protected _closeSocket(error?: Error | null): void;
|
|
179
|
+
protected _reconnect(): void;
|
|
167
180
|
private _handleCommandResponse;
|
|
168
181
|
private _handleCommandsQueue;
|
|
169
182
|
private _startResponseTimer;
|
|
170
183
|
private _serializeBinary;
|
|
171
184
|
private _serializeJson;
|
|
172
185
|
private _convertDisplayLayout;
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
186
|
+
protected _waitConnectionMessage(): void;
|
|
187
|
+
protected _stopWaitConnectionMessage(): void;
|
|
188
|
+
/**
|
|
189
|
+
* Отвечает за timeout логику в WebSocket, если неполучаем никаких сообщений в течении WAIT_MESSAGE_DELAY, то запускаем реконнект
|
|
190
|
+
*/
|
|
191
|
+
private _startDoctor;
|
|
192
|
+
private _stopDoctor;
|
|
193
|
+
private isWebTransportAvailable;
|
|
178
194
|
private _getSocketType;
|
|
179
195
|
private _markTransportStat;
|
|
180
196
|
private _logTransportStat;
|
package/package.json
CHANGED
package/static/Debug.d.ts
CHANGED
|
@@ -8,10 +8,10 @@ export declare enum DebugMessageType {
|
|
|
8
8
|
ERROR = "ERROR"
|
|
9
9
|
}
|
|
10
10
|
declare namespace Debug {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
function debug(...args: any[]): void;
|
|
12
|
+
function log(...args: any[]): void;
|
|
13
|
+
function warn(...args: any[]): void;
|
|
14
|
+
function error(...args: any[]): void;
|
|
15
15
|
function enabled(): boolean;
|
|
16
16
|
function toggle(enable: boolean): void;
|
|
17
17
|
function send(type: DebugMessageType, ...args: any[]): void;
|
package/static/Params.d.ts
CHANGED
|
@@ -306,6 +306,12 @@ export type ParamsObject = {
|
|
|
306
306
|
* _По умолчанию: `30`_
|
|
307
307
|
*/
|
|
308
308
|
videoTracksCount: number;
|
|
309
|
+
/**
|
|
310
|
+
* Минимальный интервал отправки diff для requestDisplayLayout в миллисекундах.
|
|
311
|
+
*
|
|
312
|
+
* _По умолчанию: `250`_
|
|
313
|
+
*/
|
|
314
|
+
requestDisplayLayoutThrottleMs: number;
|
|
309
315
|
/** @hidden */
|
|
310
316
|
movieShare: boolean;
|
|
311
317
|
/** @hidden */
|
|
@@ -963,6 +969,7 @@ export default abstract class Params {
|
|
|
963
969
|
static get audioNack(): boolean;
|
|
964
970
|
static get movieShare(): boolean;
|
|
965
971
|
static get videoTracksCount(): number;
|
|
972
|
+
static get requestDisplayLayoutThrottleMs(): number;
|
|
966
973
|
static get breakVideoPayloadTypes(): boolean;
|
|
967
974
|
static get useCallsToContacts(): boolean;
|
|
968
975
|
static get useParticipantListChunk(): boolean;
|
|
@@ -1010,6 +1017,7 @@ export default abstract class Params {
|
|
|
1010
1017
|
screenShareCongestionControl: boolean;
|
|
1011
1018
|
screenShareCongestionControlThreshold: number;
|
|
1012
1019
|
videoTracksCount: number;
|
|
1020
|
+
requestDisplayLayoutThrottleMs: number;
|
|
1013
1021
|
asrDataChannel: boolean;
|
|
1014
1022
|
videoMaxHeight: number;
|
|
1015
1023
|
videoMaxWidth: number;
|
|
@@ -54,4 +54,37 @@ export type ParticipantLayout = (Layout | StopStream | RequestKeyFrame) & {
|
|
|
54
54
|
*/
|
|
55
55
|
streamName?: string;
|
|
56
56
|
};
|
|
57
|
+
/**
|
|
58
|
+
* Запрос стрима, который клиент хочет получать для отображения.
|
|
59
|
+
*/
|
|
60
|
+
export type DisplayLayoutRequest = {
|
|
61
|
+
/**
|
|
62
|
+
* Внешний ID пользователя
|
|
63
|
+
*/
|
|
64
|
+
uid: ExternalParticipantId | string;
|
|
65
|
+
/**
|
|
66
|
+
* Тип медиа (видео с камеры, картинка с экрана, лайв или мувик)
|
|
67
|
+
*/
|
|
68
|
+
mediaType: MediaType;
|
|
69
|
+
/**
|
|
70
|
+
* Ширина окошка в котором отображается видео, в пикселях
|
|
71
|
+
*/
|
|
72
|
+
width: number;
|
|
73
|
+
/**
|
|
74
|
+
* Высота окошка в котором отображается видео, в пикселях
|
|
75
|
+
*/
|
|
76
|
+
height: number;
|
|
77
|
+
/**
|
|
78
|
+
* Отображать видео как CSS object-fit: cover. По умолчанию используется contain.
|
|
79
|
+
*/
|
|
80
|
+
cover?: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* Приоритет
|
|
83
|
+
*/
|
|
84
|
+
priority?: number;
|
|
85
|
+
/**
|
|
86
|
+
* ID лайва или мувика. null для камеры или скрин-шары.
|
|
87
|
+
*/
|
|
88
|
+
streamName?: string;
|
|
89
|
+
};
|
|
57
90
|
export default ParticipantLayout;
|
|
@@ -41,10 +41,11 @@ export interface CallStatReport {
|
|
|
41
41
|
remote_connection_type?: RTCIceCandidateType;
|
|
42
42
|
}
|
|
43
43
|
export interface ICallStatLog extends Pick<CallStatReport, 'call_topology' | 'nack_sent' | 'nack_received' | 'pli_sent' | 'pli_received' | 'fir_sent' | 'fir_received' | 'frames_dropped' | 'stat_time_delta'>, Pick<Partial<CallStatReport>, 'rtt' | 'jitter_video' | 'jitter_audio' | 'interframe_delay_variance' | 'freeze_count' | 'total_freezes_duration' | 'ss_freeze_count' | 'ss_total_freezes_duration' | 'inserted_audio_samples_for_deceleration' | 'removed_audio_samples_for_acceleration' | 'concealed_audio_samples' | 'total_audio_energy' | 'local_address' | 'local_connection_type' | 'network_type' | 'transport' | 'remote_address' | 'remote_connection_type'> {
|
|
44
|
+
is_simulcast?: boolean;
|
|
44
45
|
concealed_silent_audio_samples?: number;
|
|
45
46
|
concealment_audio_avg_size?: number;
|
|
46
47
|
video_loss?: number;
|
|
47
48
|
audio_loss?: number;
|
|
48
49
|
cpu_hardware_concurrency?: number;
|
|
49
|
-
[k: string]: string | number | undefined;
|
|
50
|
+
[k: string]: string | number | boolean | undefined;
|
|
50
51
|
}
|
package/types/WebTransport.d.ts
CHANGED
|
@@ -7,8 +7,6 @@ declare class WebTransportEventual {
|
|
|
7
7
|
private readonly url;
|
|
8
8
|
private readonly options;
|
|
9
9
|
private readonly compression;
|
|
10
|
-
private closeRequested;
|
|
11
|
-
private closeEventEmitted;
|
|
12
10
|
private encoder;
|
|
13
11
|
private decoder;
|
|
14
12
|
onopen: ((this: WebTransportEventual, ev: Event) => any) | null;
|
|
@@ -24,8 +22,6 @@ declare class WebTransportEventual {
|
|
|
24
22
|
send(data: string): Promise<void>;
|
|
25
23
|
private createErrorEvent;
|
|
26
24
|
close(code?: number, reason?: string): void;
|
|
27
|
-
private closeConnectedTransport;
|
|
28
|
-
private emitClose;
|
|
29
25
|
static isBrowserSupported(): boolean;
|
|
30
26
|
}
|
|
31
27
|
export { WebTransportEventual as WebTransport };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import ConversationResponse from '../types/ConversationResponse';
|
|
2
|
-
export type ConversationResponseSource = 'startConversation' | 'joinConversation' | 'joinConversationByLink' | 'fastStart' | 'fastJoin';
|
|
3
|
-
export declare function assertValidConversationResponse(response: ConversationResponse | null | undefined, source: ConversationResponseSource): void;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import SignalingConnectionType from '../enums/SignalingConnectionType';
|
|
2
|
-
import { SignalingTransportType } from '../enums/SignalingTransportStat';
|
|
3
|
-
export declare enum SignalingTransportFailure {
|
|
4
|
-
EMPTY_ENDPOINT = "EMPTY_ENDPOINT",
|
|
5
|
-
NETWORK_ERROR = "NETWORK_ERROR",
|
|
6
|
-
ABORTED = "ABORTED"
|
|
7
|
-
}
|
|
8
|
-
export type SignalingTransportFailedEvent = {
|
|
9
|
-
failure: SignalingTransportFailure;
|
|
10
|
-
message: string;
|
|
11
|
-
remote?: boolean;
|
|
12
|
-
};
|
|
13
|
-
export type SignalingTransportReconnectEvent = {
|
|
14
|
-
count: number;
|
|
15
|
-
delay: number;
|
|
16
|
-
};
|
|
17
|
-
export type SignalingTransportHandlers = {
|
|
18
|
-
onOpen: () => void;
|
|
19
|
-
onMessage: (event: MessageEvent) => void;
|
|
20
|
-
onError: (event: Event) => void;
|
|
21
|
-
onClose: (event: CloseEvent) => void;
|
|
22
|
-
onFailed: (event: SignalingTransportFailedEvent) => void;
|
|
23
|
-
onReconnectScheduled: (event: SignalingTransportReconnectEvent) => void;
|
|
24
|
-
onConnectionDead: () => void;
|
|
25
|
-
};
|
|
26
|
-
export default class SignalingTransport {
|
|
27
|
-
private readonly handlers;
|
|
28
|
-
private socket;
|
|
29
|
-
private endpoint;
|
|
30
|
-
private wtEndpoint;
|
|
31
|
-
private peerId;
|
|
32
|
-
private lastStamp;
|
|
33
|
-
private connectionType;
|
|
34
|
-
private reconnectCount;
|
|
35
|
-
private reconnectTimer;
|
|
36
|
-
private doctorTimer;
|
|
37
|
-
private forceWebSocket;
|
|
38
|
-
private abortSignal;
|
|
39
|
-
private manualClose;
|
|
40
|
-
private currentType;
|
|
41
|
-
constructor(handlers: SignalingTransportHandlers);
|
|
42
|
-
get readyState(): number | null;
|
|
43
|
-
get type(): SignalingTransportType;
|
|
44
|
-
setEndpoint(endpoint: string): void;
|
|
45
|
-
setWebTransportEndpoint(endpoint: string | null): void;
|
|
46
|
-
setPeerId(peerId: number | null): void;
|
|
47
|
-
setLastStamp(lastStamp: number): void;
|
|
48
|
-
setAbortSignal(signal?: AbortSignal): void;
|
|
49
|
-
resetReconnectCount(): void;
|
|
50
|
-
connect(connectionType: SignalingConnectionType): void;
|
|
51
|
-
close(code?: number): void;
|
|
52
|
-
send(data: string | ArrayBuffer): void;
|
|
53
|
-
private _connect;
|
|
54
|
-
private _connectWebTransport;
|
|
55
|
-
private _connectWebSocket;
|
|
56
|
-
private _setSocketHandlers;
|
|
57
|
-
private _buildUrl;
|
|
58
|
-
private _canUseWebTransport;
|
|
59
|
-
private _onOpen;
|
|
60
|
-
private _onMessage;
|
|
61
|
-
private _onError;
|
|
62
|
-
private _onClose;
|
|
63
|
-
private _disconnect;
|
|
64
|
-
private _scheduleReconnect;
|
|
65
|
-
private _getReconnectDelay;
|
|
66
|
-
private _startDoctor;
|
|
67
|
-
private _stopDoctor;
|
|
68
|
-
}
|