livekit-client 1.9.2 → 1.9.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/livekit-client.esm.mjs +3251 -3013
- package/dist/livekit-client.esm.mjs.map +1 -1
- package/dist/livekit-client.umd.js +1 -1
- package/dist/livekit-client.umd.js.map +1 -1
- package/dist/src/api/SignalClient.d.ts +98 -98
- package/dist/src/api/SignalClient.d.ts.map +1 -1
- package/dist/src/connectionHelper/ConnectionCheck.d.ts +25 -24
- package/dist/src/connectionHelper/ConnectionCheck.d.ts.map +1 -1
- package/dist/src/connectionHelper/checks/Checker.d.ts +58 -58
- package/dist/src/connectionHelper/checks/publishAudio.d.ts +5 -5
- package/dist/src/connectionHelper/checks/publishVideo.d.ts +5 -5
- package/dist/src/connectionHelper/checks/reconnect.d.ts +5 -5
- package/dist/src/connectionHelper/checks/turn.d.ts +5 -5
- package/dist/src/connectionHelper/checks/webrtc.d.ts +5 -5
- package/dist/src/connectionHelper/checks/websocket.d.ts +5 -5
- package/dist/src/index.d.ts +34 -31
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/logger.d.ts +25 -25
- package/dist/src/options.d.ts +98 -98
- package/dist/src/proto/google/protobuf/timestamp.d.ts +145 -145
- package/dist/src/proto/livekit_models.d.ts +2300 -2300
- package/dist/src/proto/livekit_rtc.d.ts +14032 -14032
- package/dist/src/room/DefaultReconnectPolicy.d.ts +7 -7
- package/dist/src/room/DeviceManager.d.ts +8 -8
- package/dist/src/room/PCTransport.d.ts +37 -37
- package/dist/src/room/PCTransport.d.ts.map +1 -1
- package/dist/src/room/RTCEngine.d.ts +126 -121
- package/dist/src/room/RTCEngine.d.ts.map +1 -1
- package/dist/src/room/ReconnectPolicy.d.ts +23 -23
- package/dist/src/room/RegionUrlProvider.d.ts +13 -13
- package/dist/src/room/Room.d.ts +232 -232
- package/dist/src/room/defaults.d.ts +7 -7
- package/dist/src/room/defaults.d.ts.map +1 -1
- package/dist/src/room/errors.d.ts +42 -42
- package/dist/src/room/events.d.ts +455 -455
- package/dist/src/room/participant/LocalParticipant.d.ts +170 -170
- package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
- package/dist/src/room/participant/Participant.d.ts +93 -93
- package/dist/src/room/participant/ParticipantTrackPermission.d.ts +25 -25
- package/dist/src/room/participant/RemoteParticipant.d.ts +52 -51
- package/dist/src/room/participant/RemoteParticipant.d.ts.map +1 -1
- package/dist/src/room/participant/publishUtils.d.ts +19 -18
- package/dist/src/room/participant/publishUtils.d.ts.map +1 -1
- package/dist/src/room/stats.d.ts +66 -66
- package/dist/src/room/timers.d.ts +12 -12
- package/dist/src/room/track/LocalAudioTrack.d.ts +24 -24
- package/dist/src/room/track/LocalAudioTrack.d.ts.map +1 -1
- package/dist/src/room/track/LocalTrack.d.ts +43 -43
- package/dist/src/room/track/LocalTrackPublication.d.ts +37 -37
- package/dist/src/room/track/LocalVideoTrack.d.ts +53 -53
- package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
- package/dist/src/room/track/RemoteAudioTrack.d.ts +52 -52
- package/dist/src/room/track/RemoteAudioTrack.d.ts.map +1 -1
- package/dist/src/room/track/RemoteTrack.d.ts +14 -14
- package/dist/src/room/track/RemoteTrackPublication.d.ts +60 -60
- package/dist/src/room/track/RemoteVideoTrack.d.ts +52 -52
- package/dist/src/room/track/RemoteVideoTrack.d.ts.map +1 -1
- package/dist/src/room/track/Track.d.ts +124 -124
- package/dist/src/room/track/TrackPublication.d.ts +67 -67
- package/dist/src/room/track/create.d.ts +23 -23
- package/dist/src/room/track/create.d.ts.map +1 -1
- package/dist/src/room/track/options.d.ts +255 -247
- package/dist/src/room/track/options.d.ts.map +1 -1
- package/dist/src/room/track/types.d.ts +22 -22
- package/dist/src/room/track/utils.d.ts +13 -13
- package/dist/src/room/types.d.ts +25 -25
- package/dist/src/room/utils.d.ts +86 -85
- package/dist/src/room/utils.d.ts.map +1 -1
- package/dist/src/test/MockMediaStreamTrack.d.ts +25 -25
- package/dist/src/test/mocks.d.ts +10 -10
- package/dist/src/version.d.ts +2 -2
- package/dist/ts4.2/src/connectionHelper/ConnectionCheck.d.ts +2 -1
- package/dist/ts4.2/src/index.d.ts +8 -6
- package/dist/ts4.2/src/room/PCTransport.d.ts +1 -1
- package/dist/ts4.2/src/room/RTCEngine.d.ts +6 -1
- package/dist/ts4.2/src/room/defaults.d.ts +1 -1
- package/dist/ts4.2/src/room/participant/LocalParticipant.d.ts +4 -4
- package/dist/ts4.2/src/room/participant/RemoteParticipant.d.ts +2 -1
- package/dist/ts4.2/src/room/participant/publishUtils.d.ts +2 -1
- package/dist/ts4.2/src/room/track/LocalAudioTrack.d.ts +1 -1
- package/dist/ts4.2/src/room/track/LocalVideoTrack.d.ts +1 -1
- package/dist/ts4.2/src/room/track/RemoteAudioTrack.d.ts +1 -1
- package/dist/ts4.2/src/room/track/create.d.ts +1 -1
- package/dist/ts4.2/src/room/track/options.d.ts +10 -2
- package/dist/ts4.2/src/room/utils.d.ts +1 -0
- package/package.json +12 -12
- package/src/api/SignalClient.ts +10 -11
- package/src/connectionHelper/ConnectionCheck.ts +2 -1
- package/src/index.ts +13 -8
- package/src/room/PCTransport.ts +9 -5
- package/src/room/RTCEngine.ts +10 -3
- package/src/room/defaults.ts +6 -4
- package/src/room/participant/LocalParticipant.ts +10 -9
- package/src/room/participant/RemoteParticipant.ts +2 -1
- package/src/room/participant/publishUtils.ts +7 -5
- package/src/room/track/LocalAudioTrack.ts +2 -1
- package/src/room/track/LocalVideoTrack.ts +3 -2
- package/src/room/track/RemoteAudioTrack.ts +2 -1
- package/src/room/track/RemoteVideoTrack.ts +4 -8
- package/src/room/track/create.ts +2 -2
- package/src/room/track/options.ts +23 -7
- package/src/room/utils.ts +15 -2
@@ -1,8 +1,8 @@
|
|
1
|
-
import type { ReconnectContext, ReconnectPolicy } from './ReconnectPolicy';
|
2
|
-
declare class DefaultReconnectPolicy implements ReconnectPolicy {
|
3
|
-
private readonly _retryDelays;
|
4
|
-
constructor(retryDelays?: number[]);
|
5
|
-
nextRetryDelayInMs(context: ReconnectContext): number | null;
|
6
|
-
}
|
7
|
-
export default DefaultReconnectPolicy;
|
1
|
+
import type { ReconnectContext, ReconnectPolicy } from './ReconnectPolicy';
|
2
|
+
declare class DefaultReconnectPolicy implements ReconnectPolicy {
|
3
|
+
private readonly _retryDelays;
|
4
|
+
constructor(retryDelays?: number[]);
|
5
|
+
nextRetryDelayInMs(context: ReconnectContext): number | null;
|
6
|
+
}
|
7
|
+
export default DefaultReconnectPolicy;
|
8
8
|
//# sourceMappingURL=DefaultReconnectPolicy.d.ts.map
|
@@ -1,9 +1,9 @@
|
|
1
|
-
export default class DeviceManager {
|
2
|
-
private static instance?;
|
3
|
-
static mediaDeviceKinds: MediaDeviceKind[];
|
4
|
-
static getInstance(): DeviceManager;
|
5
|
-
static userMediaPromiseMap: Map<MediaDeviceKind, Promise<MediaStream>>;
|
6
|
-
getDevices(kind?: MediaDeviceKind, requestPermissions?: boolean): Promise<MediaDeviceInfo[]>;
|
7
|
-
normalizeDeviceId(kind: MediaDeviceKind, deviceId?: string, groupId?: string): Promise<string | undefined>;
|
8
|
-
}
|
1
|
+
export default class DeviceManager {
|
2
|
+
private static instance?;
|
3
|
+
static mediaDeviceKinds: MediaDeviceKind[];
|
4
|
+
static getInstance(): DeviceManager;
|
5
|
+
static userMediaPromiseMap: Map<MediaDeviceKind, Promise<MediaStream>>;
|
6
|
+
getDevices(kind?: MediaDeviceKind, requestPermissions?: boolean): Promise<MediaDeviceInfo[]>;
|
7
|
+
normalizeDeviceId(kind: MediaDeviceKind, deviceId?: string, groupId?: string): Promise<string | undefined>;
|
8
|
+
}
|
9
9
|
//# sourceMappingURL=DeviceManager.d.ts.map
|
@@ -1,38 +1,38 @@
|
|
1
|
-
/// <reference types="node" />
|
2
|
-
import EventEmitter from 'events';
|
3
|
-
/** @internal */
|
4
|
-
interface TrackBitrateInfo {
|
5
|
-
sid: string;
|
6
|
-
codec: string;
|
7
|
-
maxbr: number;
|
8
|
-
}
|
9
|
-
export declare const PCEvents: {
|
10
|
-
readonly NegotiationStarted: "negotiationStarted";
|
11
|
-
readonly NegotiationComplete: "negotiationComplete";
|
12
|
-
};
|
13
|
-
/** @internal */
|
14
|
-
export default class PCTransport extends EventEmitter {
|
15
|
-
pc: RTCPeerConnection;
|
16
|
-
pendingCandidates: RTCIceCandidateInit[];
|
17
|
-
restartingIce: boolean;
|
18
|
-
renegotiate: boolean;
|
19
|
-
trackBitrates: TrackBitrateInfo[];
|
20
|
-
remoteStereoMids: string[];
|
21
|
-
remoteNackMids: string[];
|
22
|
-
onOffer?: (offer: RTCSessionDescriptionInit) => void;
|
23
|
-
constructor(config?: RTCConfiguration);
|
24
|
-
get isICEConnected(): boolean;
|
25
|
-
addIceCandidate(candidate: RTCIceCandidateInit): Promise<void>;
|
26
|
-
setRemoteDescription(sd: RTCSessionDescriptionInit): Promise<void>;
|
27
|
-
negotiate: {
|
28
|
-
(this: unknown, ...args: [onError?: ((e: Error) => void) | undefined] & any[]): Promise<void>;
|
29
|
-
cancel: (reason?: any) => void;
|
30
|
-
};
|
31
|
-
createAndSendOffer(options?: RTCOfferOptions): Promise<void>;
|
32
|
-
createAndSetAnswer(): Promise<RTCSessionDescriptionInit>;
|
33
|
-
setTrackCodecBitrate(sid: string, codec: string, maxbr: number): void;
|
34
|
-
close(): void;
|
35
|
-
private setMungedLocalDescription;
|
36
|
-
}
|
37
|
-
export {};
|
1
|
+
/// <reference types="node" />
|
2
|
+
import EventEmitter from 'events';
|
3
|
+
/** @internal */
|
4
|
+
interface TrackBitrateInfo {
|
5
|
+
sid: string;
|
6
|
+
codec: string;
|
7
|
+
maxbr: number;
|
8
|
+
}
|
9
|
+
export declare const PCEvents: {
|
10
|
+
readonly NegotiationStarted: "negotiationStarted";
|
11
|
+
readonly NegotiationComplete: "negotiationComplete";
|
12
|
+
};
|
13
|
+
/** @internal */
|
14
|
+
export default class PCTransport extends EventEmitter {
|
15
|
+
pc: RTCPeerConnection;
|
16
|
+
pendingCandidates: RTCIceCandidateInit[];
|
17
|
+
restartingIce: boolean;
|
18
|
+
renegotiate: boolean;
|
19
|
+
trackBitrates: TrackBitrateInfo[];
|
20
|
+
remoteStereoMids: string[];
|
21
|
+
remoteNackMids: string[];
|
22
|
+
onOffer?: (offer: RTCSessionDescriptionInit) => void;
|
23
|
+
constructor(config?: RTCConfiguration, mediaConstraints?: Record<string, unknown>);
|
24
|
+
get isICEConnected(): boolean;
|
25
|
+
addIceCandidate(candidate: RTCIceCandidateInit): Promise<void>;
|
26
|
+
setRemoteDescription(sd: RTCSessionDescriptionInit): Promise<void>;
|
27
|
+
negotiate: {
|
28
|
+
(this: unknown, ...args: [onError?: ((e: Error) => void) | undefined] & any[]): Promise<void>;
|
29
|
+
cancel: (reason?: any) => void;
|
30
|
+
};
|
31
|
+
createAndSendOffer(options?: RTCOfferOptions): Promise<void>;
|
32
|
+
createAndSetAnswer(): Promise<RTCSessionDescriptionInit>;
|
33
|
+
setTrackCodecBitrate(sid: string, codec: string, maxbr: number): void;
|
34
|
+
close(): void;
|
35
|
+
private setMungedLocalDescription;
|
36
|
+
}
|
37
|
+
export {};
|
38
38
|
//# sourceMappingURL=PCTransport.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PCTransport.d.ts","sourceRoot":"","sources":["../../../src/room/PCTransport.ts"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;
|
1
|
+
{"version":3,"file":"PCTransport.d.ts","sourceRoot":"","sources":["../../../src/room/PCTransport.ts"],"names":[],"mappings":";AAAA,OAAO,YAAY,MAAM,QAAQ,CAAC;AAQlC,gBAAgB;AAChB,UAAU,gBAAgB;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED,eAAO,MAAM,QAAQ;;;CAGX,CAAC;AAEX,gBAAgB;AAChB,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,YAAY;IACnD,EAAE,EAAE,iBAAiB,CAAC;IAEtB,iBAAiB,EAAE,mBAAmB,EAAE,CAAM;IAE9C,aAAa,EAAE,OAAO,CAAS;IAE/B,WAAW,EAAE,OAAO,CAAS;IAE7B,aAAa,EAAE,gBAAgB,EAAE,CAAM;IAEvC,gBAAgB,EAAE,MAAM,EAAE,CAAM;IAEhC,cAAc,EAAE,MAAM,EAAE,CAAM;IAE9B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;gBAEzC,MAAM,CAAC,EAAE,gBAAgB,EAAE,gBAAgB,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM;IAQrF,IAAI,cAAc,IAAI,OAAO,CAE5B;IAEK,eAAe,CAAC,SAAS,EAAE,mBAAmB,GAAG,OAAO,CAAC,IAAI,CAAC;IAO9D,oBAAoB,CAAC,EAAE,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;IAuBxE,SAAS;iDAA2B,KAAK,KAAK,IAAI;;MAW1C;IAEF,kBAAkB,CAAC,OAAO,CAAC,EAAE,eAAe;IAwF5C,kBAAkB,IAAI,OAAO,CAAC,yBAAyB,CAAC;IAY9D,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAQ9D,KAAK;YAMS,yBAAyB;CA4BxC"}
|
@@ -1,122 +1,127 @@
|
|
1
|
-
import type TypedEventEmitter from 'typed-emitter';
|
2
|
-
import { SignalClient
|
3
|
-
import type {
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import
|
7
|
-
import
|
8
|
-
import type
|
9
|
-
import type
|
10
|
-
import type {
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
private
|
28
|
-
private
|
29
|
-
private
|
30
|
-
private
|
31
|
-
private
|
32
|
-
private
|
33
|
-
private
|
34
|
-
private
|
35
|
-
private
|
36
|
-
private
|
37
|
-
private
|
38
|
-
private
|
39
|
-
private
|
40
|
-
private
|
41
|
-
private
|
42
|
-
private
|
43
|
-
|
44
|
-
private
|
45
|
-
|
46
|
-
private
|
47
|
-
private
|
48
|
-
|
49
|
-
private
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
private
|
71
|
-
private
|
72
|
-
private
|
73
|
-
|
74
|
-
|
75
|
-
private
|
76
|
-
private
|
77
|
-
private
|
78
|
-
|
79
|
-
|
80
|
-
private
|
81
|
-
private
|
82
|
-
private
|
83
|
-
|
84
|
-
private
|
85
|
-
|
86
|
-
|
87
|
-
private
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
private
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
1
|
+
import type TypedEventEmitter from 'typed-emitter';
|
2
|
+
import { SignalClient } from '../api/SignalClient';
|
3
|
+
import type { SignalOptions } from '../api/SignalClient';
|
4
|
+
import type { InternalRoomOptions } from '../options';
|
5
|
+
import { DataPacket, DataPacket_Kind, DisconnectReason, SpeakerInfo, TrackInfo, UserPacket } from '../proto/livekit_models';
|
6
|
+
import { AddTrackRequest, JoinResponse } from '../proto/livekit_rtc';
|
7
|
+
import PCTransport from './PCTransport';
|
8
|
+
import type LocalTrack from './track/LocalTrack';
|
9
|
+
import type LocalVideoTrack from './track/LocalVideoTrack';
|
10
|
+
import type { SimulcastTrackInfo } from './track/LocalVideoTrack';
|
11
|
+
import type { TrackPublishOptions } from './track/options';
|
12
|
+
declare const RTCEngine_base: new () => TypedEventEmitter<EngineEventCallbacks>;
|
13
|
+
/** @internal */
|
14
|
+
export default class RTCEngine extends RTCEngine_base {
|
15
|
+
private options;
|
16
|
+
publisher?: PCTransport;
|
17
|
+
subscriber?: PCTransport;
|
18
|
+
client: SignalClient;
|
19
|
+
rtcConfig: RTCConfiguration;
|
20
|
+
peerConnectionTimeout: number;
|
21
|
+
fullReconnectOnNext: boolean;
|
22
|
+
/**
|
23
|
+
* @internal
|
24
|
+
*/
|
25
|
+
latestJoinResponse?: JoinResponse;
|
26
|
+
get isClosed(): boolean;
|
27
|
+
private lossyDC?;
|
28
|
+
private lossyDCSub?;
|
29
|
+
private reliableDC?;
|
30
|
+
private dcBufferStatus;
|
31
|
+
private reliableDCSub?;
|
32
|
+
private subscriberPrimary;
|
33
|
+
private primaryPC?;
|
34
|
+
private pcState;
|
35
|
+
private _isClosed;
|
36
|
+
private pendingTrackResolvers;
|
37
|
+
private hasPublished;
|
38
|
+
private url?;
|
39
|
+
private token?;
|
40
|
+
private signalOpts?;
|
41
|
+
private reconnectAttempts;
|
42
|
+
private reconnectStart;
|
43
|
+
private clientConfiguration?;
|
44
|
+
private attemptingReconnect;
|
45
|
+
private reconnectPolicy;
|
46
|
+
private reconnectTimeout?;
|
47
|
+
private participantSid?;
|
48
|
+
/** keeps track of how often an initial join connection has been tried */
|
49
|
+
private joinAttempts;
|
50
|
+
/** specifies how often an initial join connection is allowed to retry */
|
51
|
+
private maxJoinAttempts;
|
52
|
+
private closingLock;
|
53
|
+
private dataProcessLock;
|
54
|
+
private shouldFailNext;
|
55
|
+
private regionUrlProvider?;
|
56
|
+
constructor(options: InternalRoomOptions);
|
57
|
+
join(url: string, token: string, opts: SignalOptions, abortSignal?: AbortSignal): Promise<JoinResponse>;
|
58
|
+
close(): Promise<void>;
|
59
|
+
addTrack(req: AddTrackRequest): Promise<TrackInfo>;
|
60
|
+
/**
|
61
|
+
* Removes sender from PeerConnection, returning true if it was removed successfully
|
62
|
+
* and a negotiation is necessary
|
63
|
+
* @param sender
|
64
|
+
* @returns
|
65
|
+
*/
|
66
|
+
removeTrack(sender: RTCRtpSender): boolean;
|
67
|
+
updateMuteStatus(trackSid: string, muted: boolean): void;
|
68
|
+
get dataSubscriberReadyState(): string | undefined;
|
69
|
+
getConnectedServerAddress(): Promise<string | undefined>;
|
70
|
+
private configure;
|
71
|
+
private makeRTCConfiguration;
|
72
|
+
private createDataChannels;
|
73
|
+
private handleDataChannel;
|
74
|
+
private handleDataMessage;
|
75
|
+
private handleDataError;
|
76
|
+
private handleBufferedAmountLow;
|
77
|
+
private setPreferredCodec;
|
78
|
+
createSender(track: LocalTrack, opts: TrackPublishOptions, encodings?: RTCRtpEncodingParameters[]): Promise<RTCRtpSender>;
|
79
|
+
createSimulcastSender(track: LocalVideoTrack, simulcastTrack: SimulcastTrackInfo, opts: TrackPublishOptions, encodings?: RTCRtpEncodingParameters[]): Promise<RTCRtpSender | undefined>;
|
80
|
+
private createTransceiverRTCRtpSender;
|
81
|
+
private createSimulcastTransceiverSender;
|
82
|
+
private createRTCRtpSender;
|
83
|
+
private handleDisconnect;
|
84
|
+
private attemptReconnect;
|
85
|
+
private getNextRetryDelay;
|
86
|
+
private restartConnection;
|
87
|
+
private resumeConnection;
|
88
|
+
waitForPCInitialConnection(timeout?: number, abortController?: AbortController): Promise<void>;
|
89
|
+
private waitForPCReconnected;
|
90
|
+
waitForRestarted: () => Promise<void>;
|
91
|
+
sendDataPacket(packet: DataPacket, kind: DataPacket_Kind): Promise<void>;
|
92
|
+
private updateAndEmitDCBufferStatus;
|
93
|
+
private isBufferStatusLow;
|
94
|
+
/**
|
95
|
+
* @internal
|
96
|
+
*/
|
97
|
+
ensureDataTransportConnected(kind: DataPacket_Kind, subscriber?: boolean): Promise<void>;
|
98
|
+
private ensurePublisherConnected;
|
99
|
+
verifyTransport(): boolean;
|
100
|
+
/** @internal */
|
101
|
+
negotiate(): Promise<void>;
|
102
|
+
dataChannelForKind(kind: DataPacket_Kind, sub?: boolean): RTCDataChannel | undefined;
|
103
|
+
failNext(): void;
|
104
|
+
private clearReconnectTimeout;
|
105
|
+
private clearPendingReconnect;
|
106
|
+
private handleBrowserOnLine;
|
107
|
+
private registerOnLineListener;
|
108
|
+
private deregisterOnLineListener;
|
109
|
+
}
|
110
|
+
export type EngineEventCallbacks = {
|
111
|
+
connected: (joinResp: JoinResponse) => void;
|
112
|
+
disconnected: (reason?: DisconnectReason) => void;
|
113
|
+
resuming: () => void;
|
114
|
+
resumed: () => void;
|
115
|
+
restarting: () => void;
|
116
|
+
restarted: () => void;
|
117
|
+
signalResumed: () => void;
|
118
|
+
signalRestarted: (joinResp: JoinResponse) => void;
|
119
|
+
closing: () => void;
|
120
|
+
mediaTrackAdded: (track: MediaStreamTrack, streams: MediaStream, receiver?: RTCRtpReceiver) => void;
|
121
|
+
activeSpeakersUpdate: (speakers: Array<SpeakerInfo>) => void;
|
122
|
+
dataPacketReceived: (userPacket: UserPacket, kind: DataPacket_Kind) => void;
|
123
|
+
transportsCreated: (publisher: PCTransport, subscriber: PCTransport) => void;
|
124
|
+
dcBufferStatusChanged: (isLow: boolean, kind: DataPacket_Kind) => void;
|
125
|
+
};
|
126
|
+
export {};
|
122
127
|
//# sourceMappingURL=RTCEngine.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RTCEngine.d.ts","sourceRoot":"","sources":["../../../src/room/RTCEngine.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,iBAAiB,MAAM,eAAe,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;
|
1
|
+
{"version":3,"file":"RTCEngine.d.ts","sourceRoot":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AS;IAmBpF,QAAQ;IAKR,OAAO,CAAC,qBAAqB;IAM7B,OAAO,CAAC,qBAAqB;IAK7B,OAAO,CAAC,mBAAmB,CAMzB;IAEF,OAAO,CAAC,sBAAsB;IAM9B,OAAO,CAAC,wBAAwB;CAKjC;AAsCD,MAAM,MAAM,oBAAoB,GAAG;IACjC,SAAS,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;IAC5C,YAAY,EAAE,CAAC,MAAM,CAAC,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAClD,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,eAAe,EAAE,CAAC,QAAQ,EAAE,YAAY,KAAK,IAAI,CAAC;IAClD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,eAAe,EAAE,CACf,KAAK,EAAE,gBAAgB,EACvB,OAAO,EAAE,WAAW,EACpB,QAAQ,CAAC,EAAE,cAAc,KACtB,IAAI,CAAC;IACV,oBAAoB,EAAE,CAAC,QAAQ,EAAE,KAAK,CAAC,WAAW,CAAC,KAAK,IAAI,CAAC;IAC7D,kBAAkB,EAAE,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IAC5E,iBAAiB,EAAE,CAAC,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,WAAW,KAAK,IAAI,CAAC;IAC7E,qBAAqB,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;CACxE,CAAC"}
|
@@ -1,24 +1,24 @@
|
|
1
|
-
/** Controls reconnecting of the client */
|
2
|
-
export interface ReconnectPolicy {
|
3
|
-
/** Called after disconnect was detected
|
4
|
-
*
|
5
|
-
* @returns {number | null} Amount of time in milliseconds to delay the next reconnect attempt, `null` signals to stop retrying.
|
6
|
-
*/
|
7
|
-
nextRetryDelayInMs(context: ReconnectContext): number | null;
|
8
|
-
}
|
9
|
-
export interface ReconnectContext {
|
10
|
-
/**
|
11
|
-
* Number of failed reconnect attempts
|
12
|
-
*/
|
13
|
-
readonly retryCount: number;
|
14
|
-
/**
|
15
|
-
* Elapsed amount of time in milliseconds since the disconnect.
|
16
|
-
*/
|
17
|
-
readonly elapsedMs: number;
|
18
|
-
/**
|
19
|
-
* Reason for retrying
|
20
|
-
*/
|
21
|
-
readonly retryReason?: Error;
|
22
|
-
readonly serverUrl?: string;
|
23
|
-
}
|
1
|
+
/** Controls reconnecting of the client */
|
2
|
+
export interface ReconnectPolicy {
|
3
|
+
/** Called after disconnect was detected
|
4
|
+
*
|
5
|
+
* @returns {number | null} Amount of time in milliseconds to delay the next reconnect attempt, `null` signals to stop retrying.
|
6
|
+
*/
|
7
|
+
nextRetryDelayInMs(context: ReconnectContext): number | null;
|
8
|
+
}
|
9
|
+
export interface ReconnectContext {
|
10
|
+
/**
|
11
|
+
* Number of failed reconnect attempts
|
12
|
+
*/
|
13
|
+
readonly retryCount: number;
|
14
|
+
/**
|
15
|
+
* Elapsed amount of time in milliseconds since the disconnect.
|
16
|
+
*/
|
17
|
+
readonly elapsedMs: number;
|
18
|
+
/**
|
19
|
+
* Reason for retrying
|
20
|
+
*/
|
21
|
+
readonly retryReason?: Error;
|
22
|
+
readonly serverUrl?: string;
|
23
|
+
}
|
24
24
|
//# sourceMappingURL=ReconnectPolicy.d.ts.map
|
@@ -1,14 +1,14 @@
|
|
1
|
-
export declare class RegionUrlProvider {
|
2
|
-
private serverUrl;
|
3
|
-
private token;
|
4
|
-
private regionSettings;
|
5
|
-
private lastUpdateAt;
|
6
|
-
private settingsCacheTime;
|
7
|
-
private attemptedRegions;
|
8
|
-
constructor(url: string, token: string);
|
9
|
-
isCloud(): boolean;
|
10
|
-
getNextBestRegionUrl(abortSignal?: AbortSignal): Promise<string | null>;
|
11
|
-
resetAttempts(): void;
|
12
|
-
private fetchRegionSettings;
|
13
|
-
}
|
1
|
+
export declare class RegionUrlProvider {
|
2
|
+
private serverUrl;
|
3
|
+
private token;
|
4
|
+
private regionSettings;
|
5
|
+
private lastUpdateAt;
|
6
|
+
private settingsCacheTime;
|
7
|
+
private attemptedRegions;
|
8
|
+
constructor(url: string, token: string);
|
9
|
+
isCloud(): boolean;
|
10
|
+
getNextBestRegionUrl(abortSignal?: AbortSignal): Promise<string | null>;
|
11
|
+
resetAttempts(): void;
|
12
|
+
private fetchRegionSettings;
|
13
|
+
}
|
14
14
|
//# sourceMappingURL=RegionUrlProvider.d.ts.map
|