livekit-client 1.15.0 → 1.15.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/livekit-client.esm.mjs +5485 -5234
- 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/room/PCTransport.d.ts +9 -4
- package/dist/src/room/PCTransport.d.ts.map +1 -1
- package/dist/src/room/PCTransportManager.d.ts +51 -0
- package/dist/src/room/PCTransportManager.d.ts.map +1 -0
- package/dist/src/room/RTCEngine.d.ts +8 -5
- package/dist/src/room/RTCEngine.d.ts.map +1 -1
- package/dist/src/room/Room.d.ts +9 -0
- package/dist/src/room/Room.d.ts.map +1 -1
- package/dist/src/room/events.d.ts +10 -0
- package/dist/src/room/events.d.ts.map +1 -1
- package/dist/src/room/participant/LocalParticipant.d.ts +0 -5
- package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
- package/dist/src/room/track/Track.d.ts +6 -2
- package/dist/src/room/track/Track.d.ts.map +1 -1
- package/dist/src/room/track/utils.d.ts +3 -0
- package/dist/src/room/track/utils.d.ts.map +1 -1
- package/dist/ts4.2/src/room/PCTransport.d.ts +9 -4
- package/dist/ts4.2/src/room/PCTransportManager.d.ts +51 -0
- package/dist/ts4.2/src/room/RTCEngine.d.ts +8 -5
- package/dist/ts4.2/src/room/Room.d.ts +9 -0
- package/dist/ts4.2/src/room/events.d.ts +10 -0
- package/dist/ts4.2/src/room/participant/LocalParticipant.d.ts +0 -5
- package/dist/ts4.2/src/room/track/Track.d.ts +6 -2
- package/dist/ts4.2/src/room/track/utils.d.ts +3 -0
- package/package.json +1 -1
- package/src/connectionHelper/checks/webrtc.ts +2 -2
- package/src/room/PCTransport.ts +62 -29
- package/src/room/PCTransportManager.ts +336 -0
- package/src/room/RTCEngine.ts +178 -246
- package/src/room/Room.ts +49 -46
- package/src/room/events.ts +11 -0
- package/src/room/participant/LocalParticipant.ts +9 -51
- package/src/room/track/Track.ts +30 -9
- package/src/room/track/utils.ts +19 -0
@@ -16,6 +16,8 @@ export declare const PCEvents: {
|
|
16
16
|
export default class PCTransport extends EventEmitter {
|
17
17
|
private _pc;
|
18
18
|
private get pc();
|
19
|
+
private config?;
|
20
|
+
private mediaConstraints;
|
19
21
|
pendingCandidates: RTCIceCandidateInit[];
|
20
22
|
restartingIce: boolean;
|
21
23
|
renegotiate: boolean;
|
@@ -26,14 +28,17 @@ export default class PCTransport extends EventEmitter {
|
|
26
28
|
onIceCandidate?: (candidate: RTCIceCandidate) => void;
|
27
29
|
onIceCandidateError?: (ev: Event) => void;
|
28
30
|
onConnectionStateChange?: (state: RTCPeerConnectionState) => void;
|
31
|
+
onIceConnectionStateChange?: (state: RTCIceConnectionState) => void;
|
32
|
+
onSignalingStatechange?: (state: RTCSignalingState) => void;
|
29
33
|
onDataChannel?: (ev: RTCDataChannelEvent) => void;
|
30
34
|
onTrack?: (ev: RTCTrackEvent) => void;
|
31
35
|
constructor(config?: RTCConfiguration, mediaConstraints?: Record<string, unknown>);
|
36
|
+
private createPC;
|
32
37
|
get isICEConnected(): boolean;
|
33
38
|
addIceCandidate(candidate: RTCIceCandidateInit): Promise<void>;
|
34
39
|
setRemoteDescription(sd: RTCSessionDescriptionInit): Promise<void>;
|
35
40
|
negotiate: {
|
36
|
-
(this: unknown, ...args: [onError?: ((e: Error) => void) | undefined] & any[]): Promise<void
|
41
|
+
(this: unknown, ...args: [onError?: ((e: Error) => void) | undefined] & any[]): Promise<Promise<void>>;
|
37
42
|
cancel: (reason?: any) => void;
|
38
43
|
};
|
39
44
|
createAndSendOffer(options?: RTCOfferOptions): Promise<void>;
|
@@ -44,17 +49,17 @@ export default class PCTransport extends EventEmitter {
|
|
44
49
|
setTrackCodecBitrate(info: TrackBitrateInfo): void;
|
45
50
|
setConfiguration(rtcConfig: RTCConfiguration): void;
|
46
51
|
canRemoveTrack(): boolean;
|
47
|
-
removeTrack(sender: RTCRtpSender): void;
|
52
|
+
removeTrack(sender: RTCRtpSender): void | undefined;
|
48
53
|
getConnectionState(): RTCPeerConnectionState;
|
49
54
|
getICEConnectionState(): RTCIceConnectionState;
|
50
55
|
getSignallingState(): RTCSignalingState;
|
51
56
|
getTransceivers(): RTCRtpTransceiver[];
|
52
57
|
getSenders(): RTCRtpSender[];
|
53
|
-
getLocalDescription(): RTCSessionDescription | null;
|
58
|
+
getLocalDescription(): RTCSessionDescription | null | undefined;
|
54
59
|
getRemoteDescription(): RTCSessionDescription | null;
|
55
60
|
getStats(): Promise<RTCStatsReport>;
|
56
61
|
getConnectedAddress(): Promise<string | undefined>;
|
57
|
-
close()
|
62
|
+
close: () => void;
|
58
63
|
private setMungedSDP;
|
59
64
|
}
|
60
65
|
export {};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PCTransport.d.ts","sourceRoot":"","sources":["../../../src/room/PCTransport.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAQtC,gBAAgB;AAChB,UAAU,gBAAgB;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAUD,eAAO,MAAM,QAAQ;;;;CAIX,CAAC;AAEX,gBAAgB;AAChB,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,YAAY;IACnD,OAAO,CAAC,GAAG,CAA2B;IAEtC,OAAO,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"PCTransport.d.ts","sourceRoot":"","sources":["../../../src/room/PCTransport.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAQtC,gBAAgB;AAChB,UAAU,gBAAgB;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAUD,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;IAO9D,oBAAoB,CAAC,EAAE,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC;IAoFxE,SAAS;iDAAiC,KAAK,KAAK,IAAI;;MAWhD;IAEF,kBAAkB,CAAC,OAAO,CAAC,EAAE,eAAe;IA0F5C,kBAAkB,IAAI,OAAO,CAAC,yBAAyB,CAAC;IAY9D,iBAAiB,CAAC,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,kBAAkB;IAIpE,cAAc,CAAC,gBAAgB,EAAE,gBAAgB,EAAE,eAAe,EAAE,qBAAqB;IAIzF,QAAQ,CAAC,KAAK,EAAE,gBAAgB;IAOhC,oBAAoB,CAAC,IAAI,EAAE,gBAAgB;IAI3C,gBAAgB,CAAC,SAAS,EAAE,gBAAgB;IAO5C,cAAc,IAAI,OAAO;IAIzB,WAAW,CAAC,MAAM,EAAE,YAAY;IAIhC,kBAAkB;IAIlB,qBAAqB;IAIrB,kBAAkB;IAIlB,eAAe;IAIf,UAAU;IAIV,mBAAmB;IAInB,oBAAoB;IAIpB,QAAQ;IAIF,mBAAmB,IAAI,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC;IAqCxD,KAAK,aAiBH;YAEY,YAAY;CAgD3B"}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import { SignalTarget } from '../proto/livekit_rtc_pb';
|
2
|
+
import PCTransport from './PCTransport';
|
3
|
+
export declare enum PCTransportState {
|
4
|
+
NEW = 0,
|
5
|
+
CONNECTING = 1,
|
6
|
+
CONNECTED = 2,
|
7
|
+
FAILED = 3,
|
8
|
+
CLOSING = 4,
|
9
|
+
CLOSED = 5
|
10
|
+
}
|
11
|
+
export declare class PCTransportManager {
|
12
|
+
publisher: PCTransport;
|
13
|
+
subscriber: PCTransport;
|
14
|
+
peerConnectionTimeout: number;
|
15
|
+
get needsPublisher(): boolean;
|
16
|
+
get needsSubscriber(): boolean;
|
17
|
+
get currentState(): PCTransportState;
|
18
|
+
onStateChange?: (state: PCTransportState, pubState: RTCPeerConnectionState, subState: RTCPeerConnectionState) => void;
|
19
|
+
onIceCandidate?: (ev: RTCIceCandidate, target: SignalTarget) => void;
|
20
|
+
onDataChannel?: (ev: RTCDataChannelEvent) => void;
|
21
|
+
onTrack?: (ev: RTCTrackEvent) => void;
|
22
|
+
onPublisherOffer?: (offer: RTCSessionDescriptionInit) => void;
|
23
|
+
private isPublisherConnectionRequired;
|
24
|
+
private isSubscriberConnectionRequired;
|
25
|
+
private state;
|
26
|
+
private connectionLock;
|
27
|
+
constructor(rtcConfig: RTCConfiguration, subscriberPrimary: boolean);
|
28
|
+
requirePublisher(require?: boolean): void;
|
29
|
+
requireSubscriber(require?: boolean): void;
|
30
|
+
createAndSendPublisherOffer(options?: RTCOfferOptions): Promise<void>;
|
31
|
+
setPublisherAnswer(sd: RTCSessionDescriptionInit): Promise<void>;
|
32
|
+
removeTrack(sender: RTCRtpSender): void | undefined;
|
33
|
+
close(): Promise<void>;
|
34
|
+
triggerIceRestart(): Promise<void>;
|
35
|
+
addIceCandidate(candidate: RTCIceCandidateInit, target: SignalTarget): Promise<void>;
|
36
|
+
createSubscriberAnswerFromOffer(sd: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>;
|
37
|
+
updateConfiguration(config: RTCConfiguration, iceRestart?: boolean): void;
|
38
|
+
ensurePCTransportConnection(abortController?: AbortController, timeout?: number): Promise<void>;
|
39
|
+
negotiate(abortController: AbortController): Promise<void>;
|
40
|
+
addPublisherTransceiver(track: MediaStreamTrack, transceiverInit: RTCRtpTransceiverInit): RTCRtpTransceiver;
|
41
|
+
addPublisherTrack(track: MediaStreamTrack): RTCRtpSender;
|
42
|
+
createPublisherDataChannel(label: string, dataChannelDict: RTCDataChannelInit): RTCDataChannel;
|
43
|
+
/**
|
44
|
+
* Returns the first required transport's address if no explicit target is specified
|
45
|
+
*/
|
46
|
+
getConnectedAddress(target?: SignalTarget): Promise<string | undefined>;
|
47
|
+
private get requiredTransports();
|
48
|
+
private updateState;
|
49
|
+
private ensureTransportConnected;
|
50
|
+
}
|
51
|
+
//# sourceMappingURL=PCTransportManager.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"PCTransportManager.d.ts","sourceRoot":"","sources":["../../../src/room/PCTransportManager.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,WAAyB,MAAM,eAAe,CAAC;AAMtD,oBAAY,gBAAgB;IAC1B,GAAG,IAAA;IACH,UAAU,IAAA;IACV,SAAS,IAAA;IACT,MAAM,IAAA;IACN,OAAO,IAAA;IACP,MAAM,IAAA;CACP;AAED,qBAAa,kBAAkB;IACtB,SAAS,EAAE,WAAW,CAAC;IAEvB,UAAU,EAAE,WAAW,CAAC;IAExB,qBAAqB,EAAE,MAAM,CAAmD;IAEvF,IAAW,cAAc,YAExB;IAED,IAAW,eAAe,YAEzB;IAED,IAAW,YAAY,qBAEtB;IAEM,aAAa,CAAC,EAAE,CACrB,KAAK,EAAE,gBAAgB,EACvB,QAAQ,EAAE,sBAAsB,EAChC,QAAQ,EAAE,sBAAsB,KAC7B,IAAI,CAAC;IAEH,cAAc,CAAC,EAAE,CAAC,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,YAAY,KAAK,IAAI,CAAC;IAErE,aAAa,CAAC,EAAE,CAAC,EAAE,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAElD,OAAO,CAAC,EAAE,CAAC,EAAE,EAAE,aAAa,KAAK,IAAI,CAAC;IAEtC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,yBAAyB,KAAK,IAAI,CAAC;IAErE,OAAO,CAAC,6BAA6B,CAAU;IAE/C,OAAO,CAAC,8BAA8B,CAAU;IAEhD,OAAO,CAAC,KAAK,CAAmB;IAEhC,OAAO,CAAC,cAAc,CAAQ;gBAElB,SAAS,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,OAAO;IAmCnE,gBAAgB,CAAC,OAAO,UAAO;IAK/B,iBAAiB,CAAC,OAAO,UAAO;IAKhC,2BAA2B,CAAC,OAAO,CAAC,EAAE,eAAe;IAIrD,kBAAkB,CAAC,EAAE,EAAE,yBAAyB;IAIhD,WAAW,CAAC,MAAM,EAAE,YAAY;IAI1B,KAAK;IAkBL,iBAAiB;IAQjB,eAAe,CAAC,SAAS,EAAE,mBAAmB,EAAE,MAAM,EAAE,YAAY;IAQpE,+BAA+B,CAAC,EAAE,EAAE,yBAAyB;IAYnE,mBAAmB,CAAC,MAAM,EAAE,gBAAgB,EAAE,UAAU,CAAC,EAAE,OAAO;IAQ5D,2BAA2B,CAAC,eAAe,CAAC,EAAE,eAAe,EAAE,OAAO,CAAC,EAAE,MAAM;IAqB/E,SAAS,CAAC,eAAe,EAAE,eAAe;IA6BhD,uBAAuB,CAAC,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,qBAAqB;IAIvF,iBAAiB,CAAC,KAAK,EAAE,gBAAgB;IAIzC,0BAA0B,CAAC,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,kBAAkB;IAI7E;;OAEG;IACH,mBAAmB,CAAC,MAAM,CAAC,EAAE,YAAY;IASzC,OAAO,KAAK,kBAAkB,GAS7B;IAED,OAAO,CAAC,WAAW,CA8BjB;YAEY,wBAAwB;CAiDvC"}
|
@@ -3,24 +3,26 @@ import type { SignalOptions } from '../api/SignalClient';
|
|
3
3
|
import { SignalClient } from '../api/SignalClient';
|
4
4
|
import type { InternalRoomOptions } from '../options';
|
5
5
|
import { DataPacket, DataPacket_Kind, DisconnectReason, ParticipantInfo, Room as RoomModel, SpeakerInfo, TrackInfo, UserPacket } from '../proto/livekit_models_pb';
|
6
|
-
import { AddTrackRequest, ConnectionQualityUpdate, JoinResponse, StreamStateUpdate, SubscriptionPermissionUpdate, SubscriptionResponse } from '../proto/livekit_rtc_pb';
|
6
|
+
import { type AddTrackRequest, type ConnectionQualityUpdate, type JoinResponse, type StreamStateUpdate, type SubscriptionPermissionUpdate, type SubscriptionResponse } from '../proto/livekit_rtc_pb';
|
7
7
|
import PCTransport from './PCTransport';
|
8
|
+
import { PCTransportManager } from './PCTransportManager';
|
8
9
|
import type { RegionUrlProvider } from './RegionUrlProvider';
|
9
10
|
import type LocalTrack from './track/LocalTrack';
|
11
|
+
import type LocalTrackPublication from './track/LocalTrackPublication';
|
10
12
|
import type LocalVideoTrack from './track/LocalVideoTrack';
|
11
13
|
import type { SimulcastTrackInfo } from './track/LocalVideoTrack';
|
14
|
+
import type RemoteTrackPublication from './track/RemoteTrackPublication';
|
12
15
|
import { Track } from './track/Track';
|
13
16
|
import type { TrackPublishOptions, VideoCodec } from './track/options';
|
14
17
|
declare const RTCEngine_base: new () => TypedEventEmitter<EngineEventCallbacks>;
|
15
18
|
/** @internal */
|
16
19
|
export default class RTCEngine extends RTCEngine_base {
|
17
20
|
private options;
|
18
|
-
publisher?: PCTransport;
|
19
|
-
subscriber?: PCTransport;
|
20
21
|
client: SignalClient;
|
21
22
|
rtcConfig: RTCConfiguration;
|
22
23
|
peerConnectionTimeout: number;
|
23
24
|
fullReconnectOnNext: boolean;
|
25
|
+
pcManager?: PCTransportManager;
|
24
26
|
/**
|
25
27
|
* @internal
|
26
28
|
*/
|
@@ -32,11 +34,9 @@ export default class RTCEngine extends RTCEngine_base {
|
|
32
34
|
private dcBufferStatus;
|
33
35
|
private reliableDCSub?;
|
34
36
|
private subscriberPrimary;
|
35
|
-
private primaryTransport?;
|
36
37
|
private pcState;
|
37
38
|
private _isClosed;
|
38
39
|
private pendingTrackResolvers;
|
39
|
-
private hasPublished;
|
40
40
|
private url?;
|
41
41
|
private token?;
|
42
42
|
private signalOpts?;
|
@@ -106,7 +106,10 @@ export default class RTCEngine extends RTCEngine_base {
|
|
106
106
|
/** @internal */
|
107
107
|
negotiate(): Promise<void>;
|
108
108
|
dataChannelForKind(kind: DataPacket_Kind, sub?: boolean): RTCDataChannel | undefined;
|
109
|
+
/** @internal */
|
110
|
+
sendSyncState(remoteTracks: RemoteTrackPublication[], localTracks: LocalTrackPublication[]): void;
|
109
111
|
failNext(): void;
|
112
|
+
private dataChannelsInfo;
|
110
113
|
private clearReconnectTimeout;
|
111
114
|
private clearPendingReconnect;
|
112
115
|
private handleBrowserOnLine;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RTCEngine.d.ts","sourceRoot":"","sources":["../../../src/room/RTCEngine.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,iBAAiB,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,YAAY,
|
1
|
+
{"version":3,"file":"RTCEngine.d.ts","sourceRoot":"","sources":["../../../src/room/RTCEngine.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,iBAAiB,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,YAAY,EAA6B,MAAM,qBAAqB,CAAC;AAE9E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AACtD,OAAO,EAGL,UAAU,EACV,eAAe,EACf,gBAAgB,EAChB,eAAe,EAEf,IAAI,IAAI,SAAS,EACjB,WAAW,EACX,SAAS,EACT,UAAU,EACX,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAE5B,KAAK,YAAY,EAIjB,KAAK,iBAAiB,EACtB,KAAK,4BAA4B,EACjC,KAAK,oBAAoB,EAI1B,MAAM,yBAAyB,CAAC;AACjC,OAAO,WAAyB,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,kBAAkB,EAAoB,MAAM,sBAAsB,CAAC;AAE5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAW7D,OAAO,KAAK,UAAU,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,qBAAqB,MAAM,+BAA+B,CAAC;AACvE,OAAO,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ACzD,kBAAkB,EAAE,CAAC,MAAM,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACxD,iBAAiB,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACxD,4BAA4B,EAAE,CAAC,MAAM,EAAE,4BAA4B,KAAK,IAAI,CAAC;CAC9E,CAAC"}
|
package/dist/src/room/Room.d.ts
CHANGED
@@ -63,6 +63,7 @@ declare class Room extends Room_base {
|
|
63
63
|
private connectionReconcileInterval?;
|
64
64
|
private regionUrlProvider?;
|
65
65
|
private regionUrl?;
|
66
|
+
private isVideoPlaybackBlocked;
|
66
67
|
/**
|
67
68
|
* Creates a new Room, the primary construct for a LiveKit session.
|
68
69
|
* @param options
|
@@ -133,10 +134,15 @@ declare class Room extends Room_base {
|
|
133
134
|
* - `getUserMedia`
|
134
135
|
*/
|
135
136
|
startAudio: () => Promise<void>;
|
137
|
+
startVideo: () => Promise<void>;
|
136
138
|
/**
|
137
139
|
* Returns true if audio playback is enabled
|
138
140
|
*/
|
139
141
|
get canPlaybackAudio(): boolean;
|
142
|
+
/**
|
143
|
+
* Returns true if video playback is enabled
|
144
|
+
*/
|
145
|
+
get canPlaybackVideo(): boolean;
|
140
146
|
/**
|
141
147
|
* Returns the active audio output device used in this room.
|
142
148
|
* @return the previously successfully set audio output device ID or an empty string if the default device is used.
|
@@ -171,6 +177,8 @@ declare class Room extends Room_base {
|
|
171
177
|
private handleDataPacket;
|
172
178
|
private handleAudioPlaybackStarted;
|
173
179
|
private handleAudioPlaybackFailed;
|
180
|
+
private handleVideoPlaybackStarted;
|
181
|
+
private handleVideoPlaybackFailed;
|
174
182
|
private handleDeviceChange;
|
175
183
|
private handleRoomUpdate;
|
176
184
|
private handleConnectionQualityUpdate;
|
@@ -238,6 +246,7 @@ export type RoomEventCallbacks = {
|
|
238
246
|
trackSubscriptionPermissionChanged: (publication: RemoteTrackPublication, status: TrackPublication.PermissionStatus, participant: RemoteParticipant) => void;
|
239
247
|
trackSubscriptionStatusChanged: (publication: RemoteTrackPublication, status: TrackPublication.SubscriptionStatus, participant: RemoteParticipant) => void;
|
240
248
|
audioPlaybackChanged: (playing: boolean) => void;
|
249
|
+
videoPlaybackChanged: (playing: boolean) => void;
|
241
250
|
signalConnected: () => void;
|
242
251
|
recordingStatusChanged: (recording: boolean) => void;
|
243
252
|
participantEncryptionStatusChanged: (encrypted: boolean, participant?: Participant) => void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Room.d.ts","sourceRoot":"","sources":["../../../src/room/Room.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAO,gBAAgB,CAAC;
|
1
|
+
{"version":3,"file":"Room.d.ts","sourceRoot":"","sources":["../../../src/room/Room.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,YAAY,MAAM,eAAe,CAAC;AAC9C,OAAO,gBAAgB,CAAC;AAIxB,OAAO,KAAK,EAEV,mBAAmB,EACnB,kBAAkB,EAClB,WAAW,EACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,eAAe,EACf,gBAAgB,EAGhB,qBAAqB,EAIrB,iBAAiB,EAKlB,MAAM,4BAA4B,CAAC;AAYpC,OAAO,SAAS,MAAM,aAAa,CAAC;AAWpC,OAAO,gBAAgB,MAAM,gCAAgC,CAAC;AAC9D,OAAO,KAAK,WAAW,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AACnE,OAAO,iBAAiB,MAAM,iCAAiC,CAAC;AAGhE,OAAO,qBAAqB,MAAM,+BAA+B,CAAC;AAElE,OAAO,KAAK,WAAW,MAAM,qBAAqB,CAAC;AACnD,OAAO,sBAAsB,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAGjE,OAAO,KAAK,EAAE,i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Event {
|
|
215
215
|
* `Room.canPlaybackAudio` will indicate if audio playback is permitted.
|
216
216
|
*/
|
217
217
|
AudioPlaybackStatusChanged = "audioPlaybackChanged",
|
218
|
+
/**
|
219
|
+
* LiveKit will attempt to autoplay all video tracks when you attach them to
|
220
|
+
* a video element. However, if that fails, we'll notify you via VideoPlaybackStatusChanged.
|
221
|
+
* Calling `room.startVideo()` in a user gesture event handler will resume the video playback.
|
222
|
+
*/
|
223
|
+
VideoPlaybackStatusChanged = "videoPlaybackChanged",
|
218
224
|
/**
|
219
225
|
* When we have encountered an error while attempting to create a track.
|
220
226
|
* The errors take place in getUserMedia().
|
@@ -449,6 +455,10 @@ export declare enum TrackEvent {
|
|
449
455
|
/** @internal */
|
450
456
|
VideoDimensionsChanged = "videoDimensionsChanged",
|
451
457
|
/** @internal */
|
458
|
+
VideoPlaybackStarted = "videoPlaybackStarted",
|
459
|
+
/** @internal */
|
460
|
+
VideoPlaybackFailed = "videoPlaybackFailed",
|
461
|
+
/** @internal */
|
452
462
|
ElementAttached = "elementAttached",
|
453
463
|
/** @internal */
|
454
464
|
ElementDetached = "elementDetached",
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/room/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,oBAAY,SAAS;IACnB;;OAEG;IACH,SAAS,cAAc;IAEvB;;;OAGG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,WAAW,gBAAgB;IAE3B;;;OAGG;IACH,YAAY,iBAAiB;IAE7B;;;;OAIG;IACH,sBAAsB,2BAA2B;IAEjD;;OAEG;IACH,YAAY,2BAA2B;IAEvC;;OAEG;IACH,mBAAmB,wBAAwB;IAE3C;;;;;;OAMG;IACH,oBAAoB,yBAAyB;IAE7C;;;;;OAKG;IACH,uBAAuB,4BAA4B;IAEnD;;;;;;;;OAQG;IACH,cAAc,mBAAmB;IAEjC;;;;;OAKG;IACH,eAAe,oBAAoB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UAAU;IACf,UAAU,eAAe;IACzB,YAAY,iBAAiB;IAC7B,gBAAgB;IAChB,cAAc,mBAAmB;IACjC,gBAAgB;IAChB,kBAAkB,uBAAuB;IACzC,gBAAgB;IAChB,oBAAoB,yBAAyB;IAC7C,gBAAgB;IAChB,mBAAmB,wBAAwB;IAC3C;;;OAGG;IACH,oBAAoB,yBAAyB;IAC7C,gBAAgB;IAChB,iBAAiB,sBAAsB;IACvC,gBAAgB;IAChB,sBAAsB,2BAA2B;IACjD,gBAAgB;IAChB,eAAe,oBAAoB;IACnC,gBAAgB;IAChB,eAAe,oBAAoB;IACnC;;;OAGG;IACH,cAAc,mBAAmB;IACjC;;;OAGG;IACH,eAAe,oBAAoB;IACnC;;;OAGG;IACH,6BAA6B,kCAAkC;IAC/D;;OAEG;IACH,yBAAyB,8BAA8B;IACvD;;OAEG;IACH,kBAAkB,uBAAuB;CAC1C"}
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../../src/room/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,oBAAY,SAAS;IACnB;;OAEG;IACH,SAAS,cAAc;IAEvB;;;OAGG;IACH,YAAY,iBAAiB;IAE7B;;OAEG;IACH,WAAW,gBAAgB;IAE3B;;;OAGG;IACH,YAAY,iBAAiB;IAE7B;;;;OAIG;IACH,sBAAsB,2BAA2B;IAEjD;;OAEG;IACH,YAAY,2BAA2B;IAEvC;;OAEG;IACH,mBAAmB,wBAAwB;IAE3C;;;;;;OAMG;IACH,oBAAoB,yBAAyB;IAE7C;;;;;OAKG;IACH,uBAAuB,4BAA4B;IAEnD;;;;;;;;OAQG;IACH,cAAc,mBAAmB;IAEjC;;;;;OAKG;IACH,eAAe,oBAAoB;IAEnC;;;;OAIG;IACH,uBAAuB,4BAA4B;IAEnD;;;;OAIG;IACH,gBAAgB,qBAAqB;IAErC;;;;;OAKG;IACH,iBAAiB,sBAAsB;IAEvC;;;;OAIG;IACH,UAAU,eAAe;IAEzB;;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C,gBAAgB;IAChB,oBAAoB,yBAAyB;IAC7C,gBAAgB;IAChB,mBAAmB,wBAAwB;IAC3C;;;OAGG;IACH,oBAAoB,yBAAyB;IAC7C,gBAAgB;IAChB,iBAAiB,sBAAsB;IACvC,gBAAgB;IAChB,sBAAsB,2BAA2B;IACjD,gBAAgB;IAChB,oBAAoB,yBAAyB;IAC7C,gBAAgB;IAChB,mBAAmB,wBAAwB;IAC3C,gBAAgB;IAChB,eAAe,oBAAoB;IACnC,gBAAgB;IAChB,eAAe,oBAAoB;IACnC;;;OAGG;IACH,cAAc,mBAAmB;IACjC;;;OAGG;IACH,eAAe,oBAAoB;IACnC;;;OAGG;IACH,6BAA6B,kCAAkC;IAC/D;;OAEG;IACH,yBAAyB,8BAA8B;IACvD;;OAEG;IACH,kBAAkB,uBAAuB;CAC1C"}
|
@@ -1,6 +1,5 @@
|
|
1
1
|
import type { InternalRoomOptions } from '../../options';
|
2
2
|
import { DataPacket_Kind, ParticipantInfo, ParticipantPermission } from '../../proto/livekit_models_pb';
|
3
|
-
import { DataChannelInfo, TrackPublishedResponse } from '../../proto/livekit_rtc_pb';
|
4
3
|
import type RTCEngine from '../RTCEngine';
|
5
4
|
import LocalTrack from '../track/LocalTrack';
|
6
5
|
import LocalTrackPublication from '../track/LocalTrackPublication';
|
@@ -174,9 +173,5 @@ export default class LocalParticipant extends Participant {
|
|
174
173
|
private handleLocalTrackUnpublished;
|
175
174
|
private handleTrackEnded;
|
176
175
|
private getPublicationForTrack;
|
177
|
-
/** @internal */
|
178
|
-
publishedTracksInfo(): TrackPublishedResponse[];
|
179
|
-
/** @internal */
|
180
|
-
dataChannelsInfo(): DataChannelInfo[];
|
181
176
|
}
|
182
177
|
//# sourceMappingURL=LocalParticipant.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LocalParticipant.d.ts","sourceRoot":"","sources":["../../../../src/room/participant/LocalParticipant.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAm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;;;;;;;;;;OAUG;IACG,WAAW,CACf,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,eAAe,EACrB,cAAc,CAAC,EAAE,kBAAkB,GAClC,OAAO,CAAC,IAAI,CAAC;IAChB;;;;;;;;;;OAUG;IACG,WAAW,CACf,IAAI,EAAE,UAAU,EAChB,IAAI,EAAE,eAAe,EACrB,WAAW,CAAC,EAAE,iBAAiB,EAAE,GAAG,MAAM,EAAE,GAC3C,OAAO,CAAC,IAAI,CAAC;IAwChB;;;;;;;;;;;;;;;;OAgBG;IACH,+BAA+B,CAC7B,sBAAsB,EAAE,OAAO,EAC/B,2BAA2B,GAAE,0BAA0B,EAAO;IAShE,gBAAgB;IAChB,UAAU,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO;IA8B1C,OAAO,CAAC,kCAAkC,CASxC;IAEF,gBAAgB;IAChB,OAAO,CAAC,cAAc,CAEpB;IAGF,gBAAgB;IAChB,OAAO,CAAC,YAAY,CAWlB;IAEF,OAAO,CAAC,qBAAqB,CAG3B;IAEF,OAAO,CAAC,sBAAsB,CAG5B;IAEF,OAAO,CAAC,6BAA6B,CA0BnC;IAEF,OAAO,CAAC,2BAA2B,CAUjC;IAEF,OAAO,CAAC,gBAAgB,CA+CtB;IAEF,OAAO,CAAC,sBAAsB;CAuB/B"}
|
@@ -64,8 +64,10 @@ export declare abstract class Track extends Track_base {
|
|
64
64
|
protected handleAppVisibilityChanged(): Promise<void>;
|
65
65
|
protected addAppVisibilityListener(): void;
|
66
66
|
protected removeAppVisibilityListener(): void;
|
67
|
+
private handleElementSuspended;
|
68
|
+
private handleElementPlay;
|
69
|
+
private debouncedPlaybackStateChange;
|
67
70
|
}
|
68
|
-
/** @internal */
|
69
71
|
export declare function attachToElement(track: MediaStreamTrack, element: HTMLMediaElement): void;
|
70
72
|
/** @internal */
|
71
73
|
export declare function detachTrack(track: MediaStreamTrack, element: HTMLMediaElement): void;
|
@@ -112,10 +114,12 @@ export type TrackEventCallbacks = {
|
|
112
114
|
updateSettings: () => void;
|
113
115
|
updateSubscription: () => void;
|
114
116
|
audioPlaybackStarted: () => void;
|
115
|
-
audioPlaybackFailed: (error
|
117
|
+
audioPlaybackFailed: (error?: Error) => void;
|
116
118
|
audioSilenceDetected: () => void;
|
117
119
|
visibilityChanged: (visible: boolean, track?: any) => void;
|
118
120
|
videoDimensionsChanged: (dimensions: Track.Dimensions, track?: any) => void;
|
121
|
+
videoPlaybackStarted: () => void;
|
122
|
+
videoPlaybackFailed: (error?: Error) => void;
|
119
123
|
elementAttached: (element: HTMLMediaElement) => void;
|
120
124
|
elementDetached: (element: HTMLMediaElement) => void;
|
121
125
|
upstreamPaused: (track: any) => void;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Track.d.ts","sourceRoot":"","sources":["../../../../src/room/track/Track.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"Track.d.ts","sourceRoot":"","sources":["../../../../src/room/track/Track.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,iBAAiB,MAAM,eAAe,CAAC;AACnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EAAE,WAAW,IAAI,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;oCAUd,kBAAkB,mBAAmB,CAAC;AAArG,8BAAsB,KAAM,SAAQ,UAAkE;IACpG,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC;IAEjB,gBAAgB,EAAE,gBAAgB,EAAE,CAAM;IAE1C,OAAO,EAAE,OAAO,CAAS;IAEzB,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC;IAErB;;OAEG;IACH,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC;IAEhB;;OAEG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAE1B;;;OAGG;IACH,WAAW,EAAE,KAAK,CAAC,WAAW,CAA4B;IAE1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EAAE,MAAM,IAAI,CAAC;IAC/B,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,mBAAmB,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IAC7C,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,iBAAiB,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC3D,sBAAsB,EAAE,CAAC,UAAU,EAAE,KAAK,CAAC,UAAU,EAAE,KAAK,CAAC,EAAE,GAAG,KAAK,IAAI,CAAC;IAC5E,oBAAoB,EAAE,MAAM,IAAI,CAAC;IACjC,mBAAmB,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,KAAK,IAAI,CAAC;IAC7C,eAAe,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACrD,eAAe,EAAE,CAAC,OAAO,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACrD,cAAc,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;IACrC,eAAe,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CACvC,CAAC"}
|
@@ -1,4 +1,6 @@
|
|
1
|
+
import { TrackPublishedResponse } from '../../proto/livekit_rtc_pb';
|
1
2
|
import { Track } from './Track';
|
3
|
+
import type { TrackPublication } from './TrackPublication';
|
2
4
|
import { type AudioCaptureOptions, type CreateLocalTracksOptions, type ScreenShareCaptureOptions, type VideoCaptureOptions } from './options';
|
3
5
|
import type { AudioTrack } from './types';
|
4
6
|
export declare function mergeDefaultOptions(options?: CreateLocalTracksOptions, audioDefaults?: AudioCaptureOptions, videoDefaults?: VideoCaptureOptions): CreateLocalTracksOptions;
|
@@ -25,4 +27,5 @@ export declare function sourceToKind(source: Track.Source): MediaDeviceKind | un
|
|
25
27
|
*/
|
26
28
|
export declare function screenCaptureToDisplayMediaStreamOptions(options: ScreenShareCaptureOptions): DisplayMediaStreamOptions;
|
27
29
|
export declare function mimeTypeToVideoCodecString(mimeType: string): "vp8" | "h264" | "vp9" | "av1";
|
30
|
+
export declare function getTrackPublicationInfo<T extends TrackPublication>(tracks: T[]): TrackPublishedResponse[];
|
28
31
|
//# sourceMappingURL=utils.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/room/track/utils.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../../src/room/track/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAGpE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EACL,KAAK,mBAAmB,EACxB,KAAK,wBAAwB,EAC7B,KAAK,yBAAyB,EAC9B,KAAK,mBAAmB,EAGzB,MAAM,WAAW,CAAC;AACnB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,wBAAgB,mBAAmB,CACjC,OAAO,CAAC,EAAE,wBAAwB,EAClC,aAAa,CAAC,EAAE,mBAAmB,EACnC,aAAa,CAAC,EAAE,mBAAmB,GAClC,wBAAwB,CAmB1B;AAYD,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,wBAAwB,GAAG,sBAAsB,CAqC/F;AACD;;;GAGG;AACH,wBAAsB,aAAa,CAAC,KAAK,EAAE,UAAU,EAAE,UAAU,SAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAkBzF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,YAAY,GAAG,IAAI,CAOxD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,eAAe,wEAQjD;AAED;;GAEG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,GAAG,eAAe,GAAG,SAAS,CAQ9E;AAED;;GAEG;AACH,wBAAgB,wCAAwC,CACtD,OAAO,EAAE,yBAAyB,GACjC,yBAAyB,CA8B3B;AAED,wBAAgB,0BAA0B,CAAC,QAAQ,EAAE,MAAM,kCAM1D;AAED,wBAAgB,uBAAuB,CAAC,CAAC,SAAS,gBAAgB,EAChE,MAAM,EAAE,CAAC,EAAE,GACV,sBAAsB,EAAE,CAa1B"}
|
@@ -16,6 +16,8 @@ export declare const PCEvents: {
|
|
16
16
|
export default class PCTransport extends EventEmitter {
|
17
17
|
private _pc;
|
18
18
|
private get pc();
|
19
|
+
private config?;
|
20
|
+
private mediaConstraints;
|
19
21
|
pendingCandidates: RTCIceCandidateInit[];
|
20
22
|
restartingIce: boolean;
|
21
23
|
renegotiate: boolean;
|
@@ -26,16 +28,19 @@ export default class PCTransport extends EventEmitter {
|
|
26
28
|
onIceCandidate?: (candidate: RTCIceCandidate) => void;
|
27
29
|
onIceCandidateError?: (ev: Event) => void;
|
28
30
|
onConnectionStateChange?: (state: RTCPeerConnectionState) => void;
|
31
|
+
onIceConnectionStateChange?: (state: RTCIceConnectionState) => void;
|
32
|
+
onSignalingStatechange?: (state: RTCSignalingState) => void;
|
29
33
|
onDataChannel?: (ev: RTCDataChannelEvent) => void;
|
30
34
|
onTrack?: (ev: RTCTrackEvent) => void;
|
31
35
|
constructor(config?: RTCConfiguration, mediaConstraints?: Record<string, unknown>);
|
36
|
+
private createPC;
|
32
37
|
get isICEConnected(): boolean;
|
33
38
|
addIceCandidate(candidate: RTCIceCandidateInit): Promise<void>;
|
34
39
|
setRemoteDescription(sd: RTCSessionDescriptionInit): Promise<void>;
|
35
40
|
negotiate: {
|
36
41
|
(this: unknown, ...args: [
|
37
42
|
onError?: ((e: Error) => void) | undefined
|
38
|
-
] & any[]): Promise<void
|
43
|
+
] & any[]): Promise<Promise<void>>;
|
39
44
|
cancel: (reason?: any) => void;
|
40
45
|
};
|
41
46
|
createAndSendOffer(options?: RTCOfferOptions): Promise<void>;
|
@@ -46,17 +51,17 @@ export default class PCTransport extends EventEmitter {
|
|
46
51
|
setTrackCodecBitrate(info: TrackBitrateInfo): void;
|
47
52
|
setConfiguration(rtcConfig: RTCConfiguration): void;
|
48
53
|
canRemoveTrack(): boolean;
|
49
|
-
removeTrack(sender: RTCRtpSender): void;
|
54
|
+
removeTrack(sender: RTCRtpSender): void | undefined;
|
50
55
|
getConnectionState(): RTCPeerConnectionState;
|
51
56
|
getICEConnectionState(): RTCIceConnectionState;
|
52
57
|
getSignallingState(): RTCSignalingState;
|
53
58
|
getTransceivers(): RTCRtpTransceiver[];
|
54
59
|
getSenders(): RTCRtpSender[];
|
55
|
-
getLocalDescription(): RTCSessionDescription | null;
|
60
|
+
getLocalDescription(): RTCSessionDescription | null | undefined;
|
56
61
|
getRemoteDescription(): RTCSessionDescription | null;
|
57
62
|
getStats(): Promise<RTCStatsReport>;
|
58
63
|
getConnectedAddress(): Promise<string | undefined>;
|
59
|
-
close()
|
64
|
+
close: () => void;
|
60
65
|
private setMungedSDP;
|
61
66
|
}
|
62
67
|
export {};
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import { SignalTarget } from '../proto/livekit_rtc_pb';
|
2
|
+
import PCTransport from './PCTransport';
|
3
|
+
export declare enum PCTransportState {
|
4
|
+
NEW = 0,
|
5
|
+
CONNECTING = 1,
|
6
|
+
CONNECTED = 2,
|
7
|
+
FAILED = 3,
|
8
|
+
CLOSING = 4,
|
9
|
+
CLOSED = 5
|
10
|
+
}
|
11
|
+
export declare class PCTransportManager {
|
12
|
+
publisher: PCTransport;
|
13
|
+
subscriber: PCTransport;
|
14
|
+
peerConnectionTimeout: number;
|
15
|
+
get needsPublisher(): boolean;
|
16
|
+
get needsSubscriber(): boolean;
|
17
|
+
get currentState(): PCTransportState;
|
18
|
+
onStateChange?: (state: PCTransportState, pubState: RTCPeerConnectionState, subState: RTCPeerConnectionState) => void;
|
19
|
+
onIceCandidate?: (ev: RTCIceCandidate, target: SignalTarget) => void;
|
20
|
+
onDataChannel?: (ev: RTCDataChannelEvent) => void;
|
21
|
+
onTrack?: (ev: RTCTrackEvent) => void;
|
22
|
+
onPublisherOffer?: (offer: RTCSessionDescriptionInit) => void;
|
23
|
+
private isPublisherConnectionRequired;
|
24
|
+
private isSubscriberConnectionRequired;
|
25
|
+
private state;
|
26
|
+
private connectionLock;
|
27
|
+
constructor(rtcConfig: RTCConfiguration, subscriberPrimary: boolean);
|
28
|
+
requirePublisher(require?: boolean): void;
|
29
|
+
requireSubscriber(require?: boolean): void;
|
30
|
+
createAndSendPublisherOffer(options?: RTCOfferOptions): Promise<void>;
|
31
|
+
setPublisherAnswer(sd: RTCSessionDescriptionInit): Promise<void>;
|
32
|
+
removeTrack(sender: RTCRtpSender): void | undefined;
|
33
|
+
close(): Promise<void>;
|
34
|
+
triggerIceRestart(): Promise<void>;
|
35
|
+
addIceCandidate(candidate: RTCIceCandidateInit, target: SignalTarget): Promise<void>;
|
36
|
+
createSubscriberAnswerFromOffer(sd: RTCSessionDescriptionInit): Promise<RTCSessionDescriptionInit>;
|
37
|
+
updateConfiguration(config: RTCConfiguration, iceRestart?: boolean): void;
|
38
|
+
ensurePCTransportConnection(abortController?: AbortController, timeout?: number): Promise<void>;
|
39
|
+
negotiate(abortController: AbortController): Promise<void>;
|
40
|
+
addPublisherTransceiver(track: MediaStreamTrack, transceiverInit: RTCRtpTransceiverInit): RTCRtpTransceiver;
|
41
|
+
addPublisherTrack(track: MediaStreamTrack): RTCRtpSender;
|
42
|
+
createPublisherDataChannel(label: string, dataChannelDict: RTCDataChannelInit): RTCDataChannel;
|
43
|
+
/**
|
44
|
+
* Returns the first required transport's address if no explicit target is specified
|
45
|
+
*/
|
46
|
+
getConnectedAddress(target?: SignalTarget): Promise<string | undefined>;
|
47
|
+
private get requiredTransports();
|
48
|
+
private updateState;
|
49
|
+
private ensureTransportConnected;
|
50
|
+
}
|
51
|
+
//# sourceMappingURL=PCTransportManager.d.ts.map
|
@@ -3,24 +3,26 @@ import type { SignalOptions } from '../api/SignalClient';
|
|
3
3
|
import { SignalClient } from '../api/SignalClient';
|
4
4
|
import type { InternalRoomOptions } from '../options';
|
5
5
|
import { DataPacket, DataPacket_Kind, DisconnectReason, ParticipantInfo, Room as RoomModel, SpeakerInfo, TrackInfo, UserPacket } from '../proto/livekit_models_pb';
|
6
|
-
import { AddTrackRequest, ConnectionQualityUpdate, JoinResponse, StreamStateUpdate, SubscriptionPermissionUpdate, SubscriptionResponse } from '../proto/livekit_rtc_pb';
|
6
|
+
import type { AddTrackRequest, ConnectionQualityUpdate, JoinResponse, StreamStateUpdate, SubscriptionPermissionUpdate, SubscriptionResponse } from '../proto/livekit_rtc_pb';
|
7
7
|
import PCTransport from './PCTransport';
|
8
|
+
import { PCTransportManager } from './PCTransportManager';
|
8
9
|
import type { RegionUrlProvider } from './RegionUrlProvider';
|
9
10
|
import type LocalTrack from './track/LocalTrack';
|
11
|
+
import type LocalTrackPublication from './track/LocalTrackPublication';
|
10
12
|
import type LocalVideoTrack from './track/LocalVideoTrack';
|
11
13
|
import type { SimulcastTrackInfo } from './track/LocalVideoTrack';
|
14
|
+
import type RemoteTrackPublication from './track/RemoteTrackPublication';
|
12
15
|
import { Track } from './track/Track';
|
13
16
|
import type { TrackPublishOptions, VideoCodec } from './track/options';
|
14
17
|
declare const RTCEngine_base: new () => TypedEventEmitter<EngineEventCallbacks>;
|
15
18
|
/** @internal */
|
16
19
|
export default class RTCEngine extends RTCEngine_base {
|
17
20
|
private options;
|
18
|
-
publisher?: PCTransport;
|
19
|
-
subscriber?: PCTransport;
|
20
21
|
client: SignalClient;
|
21
22
|
rtcConfig: RTCConfiguration;
|
22
23
|
peerConnectionTimeout: number;
|
23
24
|
fullReconnectOnNext: boolean;
|
25
|
+
pcManager?: PCTransportManager;
|
24
26
|
/**
|
25
27
|
* @internal
|
26
28
|
*/
|
@@ -32,11 +34,9 @@ export default class RTCEngine extends RTCEngine_base {
|
|
32
34
|
private dcBufferStatus;
|
33
35
|
private reliableDCSub?;
|
34
36
|
private subscriberPrimary;
|
35
|
-
private primaryTransport?;
|
36
37
|
private pcState;
|
37
38
|
private _isClosed;
|
38
39
|
private pendingTrackResolvers;
|
39
|
-
private hasPublished;
|
40
40
|
private url?;
|
41
41
|
private token?;
|
42
42
|
private signalOpts?;
|
@@ -106,7 +106,10 @@ export default class RTCEngine extends RTCEngine_base {
|
|
106
106
|
/** @internal */
|
107
107
|
negotiate(): Promise<void>;
|
108
108
|
dataChannelForKind(kind: DataPacket_Kind, sub?: boolean): RTCDataChannel | undefined;
|
109
|
+
/** @internal */
|
110
|
+
sendSyncState(remoteTracks: RemoteTrackPublication[], localTracks: LocalTrackPublication[]): void;
|
109
111
|
failNext(): void;
|
112
|
+
private dataChannelsInfo;
|
110
113
|
private clearReconnectTimeout;
|
111
114
|
private clearPendingReconnect;
|
112
115
|
private handleBrowserOnLine;
|
@@ -63,6 +63,7 @@ declare class Room extends Room_base {
|
|
63
63
|
private connectionReconcileInterval?;
|
64
64
|
private regionUrlProvider?;
|
65
65
|
private regionUrl?;
|
66
|
+
private isVideoPlaybackBlocked;
|
66
67
|
/**
|
67
68
|
* Creates a new Room, the primary construct for a LiveKit session.
|
68
69
|
* @param options
|
@@ -133,10 +134,15 @@ declare class Room extends Room_base {
|
|
133
134
|
* - `getUserMedia`
|
134
135
|
*/
|
135
136
|
startAudio: () => Promise<void>;
|
137
|
+
startVideo: () => Promise<void>;
|
136
138
|
/**
|
137
139
|
* Returns true if audio playback is enabled
|
138
140
|
*/
|
139
141
|
get canPlaybackAudio(): boolean;
|
142
|
+
/**
|
143
|
+
* Returns true if video playback is enabled
|
144
|
+
*/
|
145
|
+
get canPlaybackVideo(): boolean;
|
140
146
|
/**
|
141
147
|
* Returns the active audio output device used in this room.
|
142
148
|
* @return the previously successfully set audio output device ID or an empty string if the default device is used.
|
@@ -171,6 +177,8 @@ declare class Room extends Room_base {
|
|
171
177
|
private handleDataPacket;
|
172
178
|
private handleAudioPlaybackStarted;
|
173
179
|
private handleAudioPlaybackFailed;
|
180
|
+
private handleVideoPlaybackStarted;
|
181
|
+
private handleVideoPlaybackFailed;
|
174
182
|
private handleDeviceChange;
|
175
183
|
private handleRoomUpdate;
|
176
184
|
private handleConnectionQualityUpdate;
|
@@ -238,6 +246,7 @@ export type RoomEventCallbacks = {
|
|
238
246
|
trackSubscriptionPermissionChanged: (publication: RemoteTrackPublication, status: TrackPublication.PermissionStatus, participant: RemoteParticipant) => void;
|
239
247
|
trackSubscriptionStatusChanged: (publication: RemoteTrackPublication, status: TrackPublication.SubscriptionStatus, participant: RemoteParticipant) => void;
|
240
248
|
audioPlaybackChanged: (playing: boolean) => void;
|
249
|
+
videoPlaybackChanged: (playing: boolean) => void;
|
241
250
|
signalConnected: () => void;
|
242
251
|
recordingStatusChanged: (recording: boolean) => void;
|
243
252
|
participantEncryptionStatusChanged: (encrypted: boolean, participant?: Participant) => void;
|