livekit-client 1.9.1 → 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 +3338 -3037
- 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 -97
- 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 -120
- 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 -229
- package/dist/src/room/Room.d.ts.map +1 -1
- 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/api/SignalClient.d.ts +1 -0
- 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 +7 -1
- package/dist/ts4.2/src/room/Room.d.ts +3 -0
- 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 +19 -16
- 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 +44 -4
- package/src/room/Room.ts +87 -42
- 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,54 +1,54 @@
|
|
1
|
-
import type { SignalClient } from '../../api/SignalClient';
|
2
|
-
import { VideoLayer, VideoQuality } from '../../proto/livekit_models';
|
3
|
-
import type { SubscribedCodec, SubscribedQuality } from '../../proto/livekit_rtc';
|
4
|
-
import { VideoSenderStats } from '../stats';
|
5
|
-
import LocalTrack from './LocalTrack';
|
6
|
-
import type { VideoCaptureOptions, VideoCodec } from './options';
|
7
|
-
export declare class SimulcastTrackInfo {
|
8
|
-
codec: VideoCodec;
|
9
|
-
mediaStreamTrack: MediaStreamTrack;
|
10
|
-
sender?: RTCRtpSender;
|
11
|
-
encodings?: RTCRtpEncodingParameters[];
|
12
|
-
constructor(codec: VideoCodec, mediaStreamTrack: MediaStreamTrack);
|
13
|
-
}
|
14
|
-
export default class LocalVideoTrack extends LocalTrack {
|
15
|
-
signalClient?: SignalClient;
|
16
|
-
private prevStats?;
|
17
|
-
private encodings?;
|
18
|
-
simulcastCodecs: Map<VideoCodec, SimulcastTrackInfo>;
|
19
|
-
private subscribedCodecs?;
|
20
|
-
private senderLock;
|
21
|
-
/**
|
22
|
-
*
|
23
|
-
* @param mediaTrack
|
24
|
-
* @param constraints MediaTrackConstraints that are being used when restarting or reacquiring tracks
|
25
|
-
* @param userProvidedTrack Signals to the SDK whether or not the mediaTrack should be managed (i.e. released and reacquired) internally by the SDK
|
26
|
-
*/
|
27
|
-
constructor(mediaTrack: MediaStreamTrack, constraints?: MediaTrackConstraints, userProvidedTrack?: boolean);
|
28
|
-
get isSimulcast(): boolean;
|
29
|
-
startMonitor(signalClient: SignalClient): void;
|
30
|
-
stop(): void;
|
31
|
-
mute(): Promise<LocalVideoTrack>;
|
32
|
-
unmute(): Promise<LocalVideoTrack>;
|
33
|
-
getSenderStats(): Promise<VideoSenderStats[]>;
|
34
|
-
setPublishingQuality(maxQuality: VideoQuality): void;
|
35
|
-
setDeviceId(deviceId: ConstrainDOMString): Promise<void>;
|
36
|
-
restartTrack(options?: VideoCaptureOptions): Promise<void>;
|
37
|
-
addSimulcastTrack(codec: VideoCodec, encodings?: RTCRtpEncodingParameters[]): SimulcastTrackInfo;
|
38
|
-
setSimulcastTrackSender(codec: VideoCodec, sender: RTCRtpSender): void;
|
39
|
-
/**
|
40
|
-
* @internal
|
41
|
-
* Sets codecs that should be publishing
|
42
|
-
*/
|
43
|
-
setPublishingCodecs(codecs: SubscribedCodec[]): Promise<VideoCodec[]>;
|
44
|
-
/**
|
45
|
-
* @internal
|
46
|
-
* Sets layers that should be publishing
|
47
|
-
*/
|
48
|
-
setPublishingLayers(qualities: SubscribedQuality[]): Promise<void>;
|
49
|
-
protected monitorSender: () => Promise<void>;
|
50
|
-
protected handleAppVisibilityChanged(): Promise<void>;
|
51
|
-
}
|
52
|
-
export declare function videoQualityForRid(rid: string): VideoQuality;
|
53
|
-
export declare function videoLayersFromEncodings(width: number, height: number, encodings?: RTCRtpEncodingParameters[]): VideoLayer[];
|
1
|
+
import type { SignalClient } from '../../api/SignalClient';
|
2
|
+
import { VideoLayer, VideoQuality } from '../../proto/livekit_models';
|
3
|
+
import type { SubscribedCodec, SubscribedQuality } from '../../proto/livekit_rtc';
|
4
|
+
import type { VideoSenderStats } from '../stats';
|
5
|
+
import LocalTrack from './LocalTrack';
|
6
|
+
import type { VideoCaptureOptions, VideoCodec } from './options';
|
7
|
+
export declare class SimulcastTrackInfo {
|
8
|
+
codec: VideoCodec;
|
9
|
+
mediaStreamTrack: MediaStreamTrack;
|
10
|
+
sender?: RTCRtpSender;
|
11
|
+
encodings?: RTCRtpEncodingParameters[];
|
12
|
+
constructor(codec: VideoCodec, mediaStreamTrack: MediaStreamTrack);
|
13
|
+
}
|
14
|
+
export default class LocalVideoTrack extends LocalTrack {
|
15
|
+
signalClient?: SignalClient;
|
16
|
+
private prevStats?;
|
17
|
+
private encodings?;
|
18
|
+
simulcastCodecs: Map<VideoCodec, SimulcastTrackInfo>;
|
19
|
+
private subscribedCodecs?;
|
20
|
+
private senderLock;
|
21
|
+
/**
|
22
|
+
*
|
23
|
+
* @param mediaTrack
|
24
|
+
* @param constraints MediaTrackConstraints that are being used when restarting or reacquiring tracks
|
25
|
+
* @param userProvidedTrack Signals to the SDK whether or not the mediaTrack should be managed (i.e. released and reacquired) internally by the SDK
|
26
|
+
*/
|
27
|
+
constructor(mediaTrack: MediaStreamTrack, constraints?: MediaTrackConstraints, userProvidedTrack?: boolean);
|
28
|
+
get isSimulcast(): boolean;
|
29
|
+
startMonitor(signalClient: SignalClient): void;
|
30
|
+
stop(): void;
|
31
|
+
mute(): Promise<LocalVideoTrack>;
|
32
|
+
unmute(): Promise<LocalVideoTrack>;
|
33
|
+
getSenderStats(): Promise<VideoSenderStats[]>;
|
34
|
+
setPublishingQuality(maxQuality: VideoQuality): void;
|
35
|
+
setDeviceId(deviceId: ConstrainDOMString): Promise<void>;
|
36
|
+
restartTrack(options?: VideoCaptureOptions): Promise<void>;
|
37
|
+
addSimulcastTrack(codec: VideoCodec, encodings?: RTCRtpEncodingParameters[]): SimulcastTrackInfo;
|
38
|
+
setSimulcastTrackSender(codec: VideoCodec, sender: RTCRtpSender): void;
|
39
|
+
/**
|
40
|
+
* @internal
|
41
|
+
* Sets codecs that should be publishing
|
42
|
+
*/
|
43
|
+
setPublishingCodecs(codecs: SubscribedCodec[]): Promise<VideoCodec[]>;
|
44
|
+
/**
|
45
|
+
* @internal
|
46
|
+
* Sets layers that should be publishing
|
47
|
+
*/
|
48
|
+
setPublishingLayers(qualities: SubscribedQuality[]): Promise<void>;
|
49
|
+
protected monitorSender: () => Promise<void>;
|
50
|
+
protected handleAppVisibilityChanged(): Promise<void>;
|
51
|
+
}
|
52
|
+
export declare function videoQualityForRid(rid: string): VideoQuality;
|
53
|
+
export declare function videoLayersFromEncodings(width: number, height: number, encodings?: RTCRtpEncodingParameters[]): VideoLayer[];
|
54
54
|
//# sourceMappingURL=LocalVideoTrack.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LocalVideoTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/LocalVideoTrack.ts"],"names":[],"mappings":"AAAA,OAAO,KA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E,qBAAqB,EACnC,iBAAiB,UAAO;IAM1B,IAAI,WAAW,IAAI,OAAO,CAKzB;IAGD,YAAY,CAAC,YAAY,EAAE,YAAY;IAoBvC,IAAI;IAQE,IAAI,IAAI,OAAO,CAAC,eAAe,CAAC;IAehC,MAAM,IAAI,OAAO,CAAC,eAAe,CAAC;IAclC,cAAc,IAAI,OAAO,CAAC,gBAAgB,EAAE,CAAC;IA2CnD,oBAAoB,CAAC,UAAU,EAAE,YAAY;IAYvC,WAAW,CAAC,QAAQ,EAAE,kBAAkB;IAYxC,YAAY,CAAC,OAAO,CAAC,EAAE,mBAAmB;IAWhD,iBAAiB,CAAC,KAAK,EAAE,UAAU,EAAE,SAAS,CAAC,EAAE,wBAAwB,EAAE,GAAG,kBAAkB;IAchG,uBAAuB,CAAC,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY;IAgB/D;;;OAGG;IACG,mBAAmB,CAAC,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;IAyC3E;;;OAGG;IACG,mBAAmB,CAAC,SAAS,EAAE,iBAAiB,EAAE;IASxD,SAAS,CAAC,aAAa,sBAyBrB;cAEc,0BAA0B;CAO3C;AAqED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAW5D;AAED,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,wBAAwB,EAAE,GACrC,UAAU,EAAE,CA2Bd"}
|
@@ -1,53 +1,53 @@
|
|
1
|
-
import { AudioReceiverStats } from '../stats';
|
2
|
-
import RemoteTrack from './RemoteTrack';
|
3
|
-
import type { AudioOutputOptions } from './options';
|
4
|
-
export default class RemoteAudioTrack extends RemoteTrack {
|
5
|
-
private prevStats?;
|
6
|
-
private elementVolume;
|
7
|
-
private audioContext?;
|
8
|
-
private gainNode?;
|
9
|
-
private sourceNode?;
|
10
|
-
private webAudioPluginNodes;
|
11
|
-
private sinkId?;
|
12
|
-
constructor(mediaTrack: MediaStreamTrack, sid: string, receiver?: RTCRtpReceiver, audioContext?: AudioContext, audioOutput?: AudioOutputOptions);
|
13
|
-
/**
|
14
|
-
* sets the volume for all attached audio elements
|
15
|
-
*/
|
16
|
-
setVolume(volume: number): void;
|
17
|
-
/**
|
18
|
-
* gets the volume of attached audio elements (loudest)
|
19
|
-
*/
|
20
|
-
getVolume(): number;
|
21
|
-
/**
|
22
|
-
* calls setSinkId on all attached elements, if supported
|
23
|
-
* @param deviceId audio output device
|
24
|
-
*/
|
25
|
-
setSinkId(deviceId: string): Promise<void>;
|
26
|
-
attach(): HTMLMediaElement;
|
27
|
-
attach(element: HTMLMediaElement): HTMLMediaElement;
|
28
|
-
/**
|
29
|
-
* Detaches from all attached elements
|
30
|
-
*/
|
31
|
-
detach(): HTMLMediaElement[];
|
32
|
-
/**
|
33
|
-
* Detach from a single element
|
34
|
-
* @param element
|
35
|
-
*/
|
36
|
-
detach(element: HTMLMediaElement): HTMLMediaElement;
|
37
|
-
/**
|
38
|
-
* @internal
|
39
|
-
* @experimental
|
40
|
-
*/
|
41
|
-
setAudioContext(audioContext: AudioContext | undefined): void;
|
42
|
-
/**
|
43
|
-
* @internal
|
44
|
-
* @experimental
|
45
|
-
* @param {AudioNode[]} nodes - An array of WebAudio nodes. These nodes should not be connected to each other when passed, as the sdk will take care of connecting them in the order of the array.
|
46
|
-
*/
|
47
|
-
setWebAudioPlugins(nodes: AudioNode[]): void;
|
48
|
-
private connectWebAudio;
|
49
|
-
private disconnectWebAudio;
|
50
|
-
protected monitorReceiver: () => Promise<void>;
|
51
|
-
protected getReceiverStats(): Promise<AudioReceiverStats | undefined>;
|
52
|
-
}
|
1
|
+
import type { AudioReceiverStats } from '../stats';
|
2
|
+
import RemoteTrack from './RemoteTrack';
|
3
|
+
import type { AudioOutputOptions } from './options';
|
4
|
+
export default class RemoteAudioTrack extends RemoteTrack {
|
5
|
+
private prevStats?;
|
6
|
+
private elementVolume;
|
7
|
+
private audioContext?;
|
8
|
+
private gainNode?;
|
9
|
+
private sourceNode?;
|
10
|
+
private webAudioPluginNodes;
|
11
|
+
private sinkId?;
|
12
|
+
constructor(mediaTrack: MediaStreamTrack, sid: string, receiver?: RTCRtpReceiver, audioContext?: AudioContext, audioOutput?: AudioOutputOptions);
|
13
|
+
/**
|
14
|
+
* sets the volume for all attached audio elements
|
15
|
+
*/
|
16
|
+
setVolume(volume: number): void;
|
17
|
+
/**
|
18
|
+
* gets the volume of attached audio elements (loudest)
|
19
|
+
*/
|
20
|
+
getVolume(): number;
|
21
|
+
/**
|
22
|
+
* calls setSinkId on all attached elements, if supported
|
23
|
+
* @param deviceId audio output device
|
24
|
+
*/
|
25
|
+
setSinkId(deviceId: string): Promise<void>;
|
26
|
+
attach(): HTMLMediaElement;
|
27
|
+
attach(element: HTMLMediaElement): HTMLMediaElement;
|
28
|
+
/**
|
29
|
+
* Detaches from all attached elements
|
30
|
+
*/
|
31
|
+
detach(): HTMLMediaElement[];
|
32
|
+
/**
|
33
|
+
* Detach from a single element
|
34
|
+
* @param element
|
35
|
+
*/
|
36
|
+
detach(element: HTMLMediaElement): HTMLMediaElement;
|
37
|
+
/**
|
38
|
+
* @internal
|
39
|
+
* @experimental
|
40
|
+
*/
|
41
|
+
setAudioContext(audioContext: AudioContext | undefined): void;
|
42
|
+
/**
|
43
|
+
* @internal
|
44
|
+
* @experimental
|
45
|
+
* @param {AudioNode[]} nodes - An array of WebAudio nodes. These nodes should not be connected to each other when passed, as the sdk will take care of connecting them in the order of the array.
|
46
|
+
*/
|
47
|
+
setWebAudioPlugins(nodes: AudioNode[]): void;
|
48
|
+
private connectWebAudio;
|
49
|
+
private disconnectWebAudio;
|
50
|
+
protected monitorReceiver: () => Promise<void>;
|
51
|
+
protected getReceiverStats(): Promise<AudioReceiverStats | undefined>;
|
52
|
+
}
|
53
53
|
//# sourceMappingURL=RemoteAudioTrack.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RemoteAudioTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/RemoteAudioTrack.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"RemoteAudioTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/RemoteAudioTrack.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAEnD,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEpD,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,WAAW;IACvD,OAAO,CAAC,SAAS,CAAC,CAAqB;IAEvC,OAAO,CAAC,aAAa,CAAqB;IAE1C,OAAO,CAAC,YAAY,CAAC,CAAe;IAEpC,OAAO,CAAC,QAAQ,CAAC,CAAW;IAE5B,OAAO,CAAC,UAAU,CAAC,CAA6B;IAEhD,OAAO,CAAC,mBAAmB,CAAc;IAEzC,OAAO,CAAC,MAAM,CAAC,CAAS;gBAGtB,UAAU,EAAE,gBAAgB,EAC5B,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,cAAc,EACzB,YAAY,CAAC,EAAE,YAAY,EAC3B,WAAW,CAAC,EAAE,kBAAkB;IAUlC;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,MAAM;IAWxB;;OAEG;IACH,SAAS,IAAI,MAAM;IAanB;;;OAGG;IACG,SAAS,CAAC,QAAQ,EAAE,MAAM;IAahC,MAAM,IAAI,gBAAgB;IAC1B,MAAM,CAAC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB;IAwBnD;;OAEG;IACH,MAAM,IAAI,gBAAgB,EAAE;IAE5B;;;OAGG;IACH,MAAM,CAAC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB;IAqBnD;;;OAGG;IACH,eAAe,CAAC,YAAY,EAAE,YAAY,GAAG,SAAS;IAStD;;;;OAIG;IACH,kBAAkB,CAAC,KAAK,EAAE,SAAS,EAAE;IAOrC,OAAO,CAAC,eAAe;IAmCvB,OAAO,CAAC,kBAAkB;IAO1B,SAAS,CAAC,eAAe,sBAYvB;cAEc,gBAAgB,IAAI,OAAO,CAAC,kBAAkB,GAAG,SAAS,CAAC;CAyB5E"}
|
@@ -1,15 +1,15 @@
|
|
1
|
-
import { Track } from './Track';
|
2
|
-
export default abstract class RemoteTrack extends Track {
|
3
|
-
/** @internal */
|
4
|
-
receiver?: RTCRtpReceiver;
|
5
|
-
constructor(mediaTrack: MediaStreamTrack, sid: string, kind: Track.Kind, receiver?: RTCRtpReceiver);
|
6
|
-
/** @internal */
|
7
|
-
setMuted(muted: boolean): void;
|
8
|
-
/** @internal */
|
9
|
-
setMediaStream(stream: MediaStream): void;
|
10
|
-
start(): void;
|
11
|
-
stop(): void;
|
12
|
-
startMonitor(): void;
|
13
|
-
protected abstract monitorReceiver(): void;
|
14
|
-
}
|
1
|
+
import { Track } from './Track';
|
2
|
+
export default abstract class RemoteTrack extends Track {
|
3
|
+
/** @internal */
|
4
|
+
receiver?: RTCRtpReceiver;
|
5
|
+
constructor(mediaTrack: MediaStreamTrack, sid: string, kind: Track.Kind, receiver?: RTCRtpReceiver);
|
6
|
+
/** @internal */
|
7
|
+
setMuted(muted: boolean): void;
|
8
|
+
/** @internal */
|
9
|
+
setMediaStream(stream: MediaStream): void;
|
10
|
+
start(): void;
|
11
|
+
stop(): void;
|
12
|
+
startMonitor(): void;
|
13
|
+
protected abstract monitorReceiver(): void;
|
14
|
+
}
|
15
15
|
//# sourceMappingURL=RemoteTrack.d.ts.map
|
@@ -1,61 +1,61 @@
|
|
1
|
-
import { TrackInfo, VideoQuality } from '../../proto/livekit_models';
|
2
|
-
import type RemoteTrack from './RemoteTrack';
|
3
|
-
import { Track } from './Track';
|
4
|
-
import { TrackPublication } from './TrackPublication';
|
5
|
-
export default class RemoteTrackPublication extends TrackPublication {
|
6
|
-
track?: RemoteTrack;
|
7
|
-
/** @internal */
|
8
|
-
protected allowed: boolean;
|
9
|
-
protected subscribed?: boolean;
|
10
|
-
protected disabled: boolean;
|
11
|
-
protected currentVideoQuality?: VideoQuality;
|
12
|
-
protected videoDimensions?: Track.Dimensions;
|
13
|
-
protected fps?: number;
|
14
|
-
constructor(kind: Track.Kind, ti: TrackInfo, autoSubscribe: boolean | undefined);
|
15
|
-
/**
|
16
|
-
* Subscribe or unsubscribe to this remote track
|
17
|
-
* @param subscribed true to subscribe to a track, false to unsubscribe
|
18
|
-
*/
|
19
|
-
setSubscribed(subscribed: boolean): void;
|
20
|
-
get subscriptionStatus(): TrackPublication.SubscriptionStatus;
|
21
|
-
get permissionStatus(): TrackPublication.PermissionStatus;
|
22
|
-
/**
|
23
|
-
* Returns true if track is subscribed, and ready for playback
|
24
|
-
*/
|
25
|
-
get isSubscribed(): boolean;
|
26
|
-
get isDesired(): boolean;
|
27
|
-
get isEnabled(): boolean;
|
28
|
-
/**
|
29
|
-
* disable server from sending down data for this track. this is useful when
|
30
|
-
* the participant is off screen, you may disable streaming down their video
|
31
|
-
* to reduce bandwidth requirements
|
32
|
-
* @param enabled
|
33
|
-
*/
|
34
|
-
setEnabled(enabled: boolean): void;
|
35
|
-
/**
|
36
|
-
* for tracks that support simulcasting, adjust subscribed quality
|
37
|
-
*
|
38
|
-
* This indicates the highest quality the client can accept. if network
|
39
|
-
* bandwidth does not allow, server will automatically reduce quality to
|
40
|
-
* optimize for uninterrupted video
|
41
|
-
*/
|
42
|
-
setVideoQuality(quality: VideoQuality): void;
|
43
|
-
setVideoDimensions(dimensions: Track.Dimensions): void;
|
44
|
-
setVideoFPS(fps: number): void;
|
45
|
-
get videoQuality(): VideoQuality | undefined;
|
46
|
-
/** @internal */
|
47
|
-
setTrack(track?: RemoteTrack): void;
|
48
|
-
/** @internal */
|
49
|
-
setAllowed(allowed: boolean): void;
|
50
|
-
/** @internal */
|
51
|
-
updateInfo(info: TrackInfo): void;
|
52
|
-
private emitSubscriptionUpdateIfChanged;
|
53
|
-
private emitPermissionUpdateIfChanged;
|
54
|
-
private isManualOperationAllowed;
|
55
|
-
protected handleEnded: (track: RemoteTrack) => void;
|
56
|
-
protected get isAdaptiveStream(): boolean;
|
57
|
-
protected handleVisibilityChange: (visible: boolean) => void;
|
58
|
-
protected handleVideoDimensionsChange: (dimensions: Track.Dimensions) => void;
|
59
|
-
emitTrackUpdate(): void;
|
60
|
-
}
|
1
|
+
import { TrackInfo, VideoQuality } from '../../proto/livekit_models';
|
2
|
+
import type RemoteTrack from './RemoteTrack';
|
3
|
+
import { Track } from './Track';
|
4
|
+
import { TrackPublication } from './TrackPublication';
|
5
|
+
export default class RemoteTrackPublication extends TrackPublication {
|
6
|
+
track?: RemoteTrack;
|
7
|
+
/** @internal */
|
8
|
+
protected allowed: boolean;
|
9
|
+
protected subscribed?: boolean;
|
10
|
+
protected disabled: boolean;
|
11
|
+
protected currentVideoQuality?: VideoQuality;
|
12
|
+
protected videoDimensions?: Track.Dimensions;
|
13
|
+
protected fps?: number;
|
14
|
+
constructor(kind: Track.Kind, ti: TrackInfo, autoSubscribe: boolean | undefined);
|
15
|
+
/**
|
16
|
+
* Subscribe or unsubscribe to this remote track
|
17
|
+
* @param subscribed true to subscribe to a track, false to unsubscribe
|
18
|
+
*/
|
19
|
+
setSubscribed(subscribed: boolean): void;
|
20
|
+
get subscriptionStatus(): TrackPublication.SubscriptionStatus;
|
21
|
+
get permissionStatus(): TrackPublication.PermissionStatus;
|
22
|
+
/**
|
23
|
+
* Returns true if track is subscribed, and ready for playback
|
24
|
+
*/
|
25
|
+
get isSubscribed(): boolean;
|
26
|
+
get isDesired(): boolean;
|
27
|
+
get isEnabled(): boolean;
|
28
|
+
/**
|
29
|
+
* disable server from sending down data for this track. this is useful when
|
30
|
+
* the participant is off screen, you may disable streaming down their video
|
31
|
+
* to reduce bandwidth requirements
|
32
|
+
* @param enabled
|
33
|
+
*/
|
34
|
+
setEnabled(enabled: boolean): void;
|
35
|
+
/**
|
36
|
+
* for tracks that support simulcasting, adjust subscribed quality
|
37
|
+
*
|
38
|
+
* This indicates the highest quality the client can accept. if network
|
39
|
+
* bandwidth does not allow, server will automatically reduce quality to
|
40
|
+
* optimize for uninterrupted video
|
41
|
+
*/
|
42
|
+
setVideoQuality(quality: VideoQuality): void;
|
43
|
+
setVideoDimensions(dimensions: Track.Dimensions): void;
|
44
|
+
setVideoFPS(fps: number): void;
|
45
|
+
get videoQuality(): VideoQuality | undefined;
|
46
|
+
/** @internal */
|
47
|
+
setTrack(track?: RemoteTrack): void;
|
48
|
+
/** @internal */
|
49
|
+
setAllowed(allowed: boolean): void;
|
50
|
+
/** @internal */
|
51
|
+
updateInfo(info: TrackInfo): void;
|
52
|
+
private emitSubscriptionUpdateIfChanged;
|
53
|
+
private emitPermissionUpdateIfChanged;
|
54
|
+
private isManualOperationAllowed;
|
55
|
+
protected handleEnded: (track: RemoteTrack) => void;
|
56
|
+
protected get isAdaptiveStream(): boolean;
|
57
|
+
protected handleVisibilityChange: (visible: boolean) => void;
|
58
|
+
protected handleVideoDimensionsChange: (dimensions: Track.Dimensions) => void;
|
59
|
+
emitTrackUpdate(): void;
|
60
|
+
}
|
61
61
|
//# sourceMappingURL=RemoteTrackPublication.d.ts.map
|
@@ -1,53 +1,53 @@
|
|
1
|
-
import RemoteTrack from './RemoteTrack';
|
2
|
-
import type { AdaptiveStreamSettings } from './types';
|
3
|
-
export default class RemoteVideoTrack extends RemoteTrack {
|
4
|
-
private prevStats?;
|
5
|
-
private elementInfos;
|
6
|
-
private adaptiveStreamSettings?;
|
7
|
-
private lastVisible?;
|
8
|
-
private lastDimensions?;
|
9
|
-
private isObserved;
|
10
|
-
constructor(mediaTrack: MediaStreamTrack, sid: string, receiver?: RTCRtpReceiver, adaptiveStreamSettings?: AdaptiveStreamSettings);
|
11
|
-
get isAdaptiveStream(): boolean;
|
12
|
-
get mediaStreamTrack(): MediaStreamTrack;
|
13
|
-
/** @internal */
|
14
|
-
setMuted(muted: boolean): void;
|
15
|
-
attach(): HTMLMediaElement;
|
16
|
-
attach(element: HTMLMediaElement): HTMLMediaElement;
|
17
|
-
/**
|
18
|
-
* Observe an ElementInfo for changes when adaptive streaming.
|
19
|
-
* @param elementInfo
|
20
|
-
* @internal
|
21
|
-
*/
|
22
|
-
observeElementInfo(elementInfo: ElementInfo): void;
|
23
|
-
/**
|
24
|
-
* Stop observing an ElementInfo for changes.
|
25
|
-
* @param elementInfo
|
26
|
-
* @internal
|
27
|
-
*/
|
28
|
-
stopObservingElementInfo(elementInfo: ElementInfo): void;
|
29
|
-
detach(): HTMLMediaElement[];
|
30
|
-
detach(element: HTMLMediaElement): HTMLMediaElement;
|
31
|
-
/** @internal */
|
32
|
-
getDecoderImplementation(): string | undefined;
|
33
|
-
protected monitorReceiver: () => Promise<void>;
|
34
|
-
private getReceiverStats;
|
35
|
-
private stopObservingElement;
|
36
|
-
protected handleAppVisibilityChanged(): Promise<void>;
|
37
|
-
private readonly debouncedHandleResize;
|
38
|
-
private updateVisibility;
|
39
|
-
private updateDimensions;
|
40
|
-
}
|
41
|
-
export interface ElementInfo {
|
42
|
-
element: object;
|
43
|
-
width(): number;
|
44
|
-
height(): number;
|
45
|
-
visible: boolean;
|
46
|
-
pictureInPicture: boolean;
|
47
|
-
visibilityChangedAt: number | undefined;
|
48
|
-
handleResize?: () => void;
|
49
|
-
handleVisibilityChanged?: () => void;
|
50
|
-
observe(): void;
|
51
|
-
stopObserving(): void;
|
52
|
-
}
|
1
|
+
import RemoteTrack from './RemoteTrack';
|
2
|
+
import type { AdaptiveStreamSettings } from './types';
|
3
|
+
export default class RemoteVideoTrack extends RemoteTrack {
|
4
|
+
private prevStats?;
|
5
|
+
private elementInfos;
|
6
|
+
private adaptiveStreamSettings?;
|
7
|
+
private lastVisible?;
|
8
|
+
private lastDimensions?;
|
9
|
+
private isObserved;
|
10
|
+
constructor(mediaTrack: MediaStreamTrack, sid: string, receiver?: RTCRtpReceiver, adaptiveStreamSettings?: AdaptiveStreamSettings);
|
11
|
+
get isAdaptiveStream(): boolean;
|
12
|
+
get mediaStreamTrack(): MediaStreamTrack;
|
13
|
+
/** @internal */
|
14
|
+
setMuted(muted: boolean): void;
|
15
|
+
attach(): HTMLMediaElement;
|
16
|
+
attach(element: HTMLMediaElement): HTMLMediaElement;
|
17
|
+
/**
|
18
|
+
* Observe an ElementInfo for changes when adaptive streaming.
|
19
|
+
* @param elementInfo
|
20
|
+
* @internal
|
21
|
+
*/
|
22
|
+
observeElementInfo(elementInfo: ElementInfo): void;
|
23
|
+
/**
|
24
|
+
* Stop observing an ElementInfo for changes.
|
25
|
+
* @param elementInfo
|
26
|
+
* @internal
|
27
|
+
*/
|
28
|
+
stopObservingElementInfo(elementInfo: ElementInfo): void;
|
29
|
+
detach(): HTMLMediaElement[];
|
30
|
+
detach(element: HTMLMediaElement): HTMLMediaElement;
|
31
|
+
/** @internal */
|
32
|
+
getDecoderImplementation(): string | undefined;
|
33
|
+
protected monitorReceiver: () => Promise<void>;
|
34
|
+
private getReceiverStats;
|
35
|
+
private stopObservingElement;
|
36
|
+
protected handleAppVisibilityChanged(): Promise<void>;
|
37
|
+
private readonly debouncedHandleResize;
|
38
|
+
private updateVisibility;
|
39
|
+
private updateDimensions;
|
40
|
+
}
|
41
|
+
export interface ElementInfo {
|
42
|
+
element: object;
|
43
|
+
width(): number;
|
44
|
+
height(): number;
|
45
|
+
visible: boolean;
|
46
|
+
pictureInPicture: boolean;
|
47
|
+
visibilityChangedAt: number | undefined;
|
48
|
+
handleResize?: () => void;
|
49
|
+
handleVisibilityChanged?: () => void;
|
50
|
+
observe(): void;
|
51
|
+
stopObserving(): void;
|
52
|
+
}
|
53
53
|
//# sourceMappingURL=RemoteVideoTrack.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RemoteVideoTrack.d.ts","sourceRoot":"","sources":["../../../../src/room/track/RemoteVideoTrack.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"RemoteVideoTrack.d.ts","sourceRoot":"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