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.
Files changed (106) hide show
  1. package/dist/livekit-client.esm.mjs +3338 -3037
  2. package/dist/livekit-client.esm.mjs.map +1 -1
  3. package/dist/livekit-client.umd.js +1 -1
  4. package/dist/livekit-client.umd.js.map +1 -1
  5. package/dist/src/api/SignalClient.d.ts +98 -97
  6. package/dist/src/api/SignalClient.d.ts.map +1 -1
  7. package/dist/src/connectionHelper/ConnectionCheck.d.ts +25 -24
  8. package/dist/src/connectionHelper/ConnectionCheck.d.ts.map +1 -1
  9. package/dist/src/connectionHelper/checks/Checker.d.ts +58 -58
  10. package/dist/src/connectionHelper/checks/publishAudio.d.ts +5 -5
  11. package/dist/src/connectionHelper/checks/publishVideo.d.ts +5 -5
  12. package/dist/src/connectionHelper/checks/reconnect.d.ts +5 -5
  13. package/dist/src/connectionHelper/checks/turn.d.ts +5 -5
  14. package/dist/src/connectionHelper/checks/webrtc.d.ts +5 -5
  15. package/dist/src/connectionHelper/checks/websocket.d.ts +5 -5
  16. package/dist/src/index.d.ts +34 -31
  17. package/dist/src/index.d.ts.map +1 -1
  18. package/dist/src/logger.d.ts +25 -25
  19. package/dist/src/options.d.ts +98 -98
  20. package/dist/src/proto/google/protobuf/timestamp.d.ts +145 -145
  21. package/dist/src/proto/livekit_models.d.ts +2300 -2300
  22. package/dist/src/proto/livekit_rtc.d.ts +14032 -14032
  23. package/dist/src/room/DefaultReconnectPolicy.d.ts +7 -7
  24. package/dist/src/room/DeviceManager.d.ts +8 -8
  25. package/dist/src/room/PCTransport.d.ts +37 -37
  26. package/dist/src/room/PCTransport.d.ts.map +1 -1
  27. package/dist/src/room/RTCEngine.d.ts +126 -120
  28. package/dist/src/room/RTCEngine.d.ts.map +1 -1
  29. package/dist/src/room/ReconnectPolicy.d.ts +23 -23
  30. package/dist/src/room/RegionUrlProvider.d.ts +13 -13
  31. package/dist/src/room/Room.d.ts +232 -229
  32. package/dist/src/room/Room.d.ts.map +1 -1
  33. package/dist/src/room/defaults.d.ts +7 -7
  34. package/dist/src/room/defaults.d.ts.map +1 -1
  35. package/dist/src/room/errors.d.ts +42 -42
  36. package/dist/src/room/events.d.ts +455 -455
  37. package/dist/src/room/participant/LocalParticipant.d.ts +170 -170
  38. package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
  39. package/dist/src/room/participant/Participant.d.ts +93 -93
  40. package/dist/src/room/participant/ParticipantTrackPermission.d.ts +25 -25
  41. package/dist/src/room/participant/RemoteParticipant.d.ts +52 -51
  42. package/dist/src/room/participant/RemoteParticipant.d.ts.map +1 -1
  43. package/dist/src/room/participant/publishUtils.d.ts +19 -18
  44. package/dist/src/room/participant/publishUtils.d.ts.map +1 -1
  45. package/dist/src/room/stats.d.ts +66 -66
  46. package/dist/src/room/timers.d.ts +12 -12
  47. package/dist/src/room/track/LocalAudioTrack.d.ts +24 -24
  48. package/dist/src/room/track/LocalAudioTrack.d.ts.map +1 -1
  49. package/dist/src/room/track/LocalTrack.d.ts +43 -43
  50. package/dist/src/room/track/LocalTrackPublication.d.ts +37 -37
  51. package/dist/src/room/track/LocalVideoTrack.d.ts +53 -53
  52. package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
  53. package/dist/src/room/track/RemoteAudioTrack.d.ts +52 -52
  54. package/dist/src/room/track/RemoteAudioTrack.d.ts.map +1 -1
  55. package/dist/src/room/track/RemoteTrack.d.ts +14 -14
  56. package/dist/src/room/track/RemoteTrackPublication.d.ts +60 -60
  57. package/dist/src/room/track/RemoteVideoTrack.d.ts +52 -52
  58. package/dist/src/room/track/RemoteVideoTrack.d.ts.map +1 -1
  59. package/dist/src/room/track/Track.d.ts +124 -124
  60. package/dist/src/room/track/TrackPublication.d.ts +67 -67
  61. package/dist/src/room/track/create.d.ts +23 -23
  62. package/dist/src/room/track/create.d.ts.map +1 -1
  63. package/dist/src/room/track/options.d.ts +255 -247
  64. package/dist/src/room/track/options.d.ts.map +1 -1
  65. package/dist/src/room/track/types.d.ts +22 -22
  66. package/dist/src/room/track/utils.d.ts +13 -13
  67. package/dist/src/room/types.d.ts +25 -25
  68. package/dist/src/room/utils.d.ts +86 -85
  69. package/dist/src/room/utils.d.ts.map +1 -1
  70. package/dist/src/test/MockMediaStreamTrack.d.ts +25 -25
  71. package/dist/src/test/mocks.d.ts +10 -10
  72. package/dist/src/version.d.ts +2 -2
  73. package/dist/ts4.2/src/api/SignalClient.d.ts +1 -0
  74. package/dist/ts4.2/src/connectionHelper/ConnectionCheck.d.ts +2 -1
  75. package/dist/ts4.2/src/index.d.ts +8 -6
  76. package/dist/ts4.2/src/room/PCTransport.d.ts +1 -1
  77. package/dist/ts4.2/src/room/RTCEngine.d.ts +7 -1
  78. package/dist/ts4.2/src/room/Room.d.ts +3 -0
  79. package/dist/ts4.2/src/room/defaults.d.ts +1 -1
  80. package/dist/ts4.2/src/room/participant/LocalParticipant.d.ts +4 -4
  81. package/dist/ts4.2/src/room/participant/RemoteParticipant.d.ts +2 -1
  82. package/dist/ts4.2/src/room/participant/publishUtils.d.ts +2 -1
  83. package/dist/ts4.2/src/room/track/LocalAudioTrack.d.ts +1 -1
  84. package/dist/ts4.2/src/room/track/LocalVideoTrack.d.ts +1 -1
  85. package/dist/ts4.2/src/room/track/RemoteAudioTrack.d.ts +1 -1
  86. package/dist/ts4.2/src/room/track/create.d.ts +1 -1
  87. package/dist/ts4.2/src/room/track/options.d.ts +10 -2
  88. package/dist/ts4.2/src/room/utils.d.ts +1 -0
  89. package/package.json +12 -12
  90. package/src/api/SignalClient.ts +19 -16
  91. package/src/connectionHelper/ConnectionCheck.ts +2 -1
  92. package/src/index.ts +13 -8
  93. package/src/room/PCTransport.ts +9 -5
  94. package/src/room/RTCEngine.ts +44 -4
  95. package/src/room/Room.ts +87 -42
  96. package/src/room/defaults.ts +6 -4
  97. package/src/room/participant/LocalParticipant.ts +10 -9
  98. package/src/room/participant/RemoteParticipant.ts +2 -1
  99. package/src/room/participant/publishUtils.ts +7 -5
  100. package/src/room/track/LocalAudioTrack.ts +2 -1
  101. package/src/room/track/LocalVideoTrack.ts +3 -2
  102. package/src/room/track/RemoteAudioTrack.ts +2 -1
  103. package/src/room/track/RemoteVideoTrack.ts +4 -8
  104. package/src/room/track/create.ts +2 -2
  105. package/src/room/track/options.ts +23 -7
  106. 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,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,KAAK,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAClF,OAAO,EAAE,gBAAgB,EAAoC,MAAM,UAAU,CAAC;AAE9E,OAAO,UAAU,MAAM,cAAc,CAAC;AAEtC,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,WAAW,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A6C;IAEjG,OAAO,CAAC,gBAAgB,CAAC,CAAoB;IAM7C,OAAO,CAAC,UAAU,CAAQ;IAE1B;;;;;OAKG;gBAED,UAAU,EAAE,gBAAgB,EAC5B,WAAW,CAAC,EAAE,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":"AAEA,OAAO,EAAE,kBAAkB,EAAkB,MAAM,UAAU,CAAC;AAE9D,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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,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":"AAYA,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,SAAS,CAAC;AAItD,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,WAAW;IACvD,OAAO,CAAC,SAAS,CAAC,CAAqB;IAEvC,OAAO,CAAC,YAAY,CAAqB;IAEzC,OAAO,CAAC,sBAAsB,CAAC,CAAyB;IAExD,OAAO,CAAC,WAAW,CAAC,CAAU;IAE9B,OAAO,CAAC,cAAc,CAAC,CAAmB;IAE1C,OAAO,CAAC,UAAU,CAAkB;gBAGlC,UAAU,EAAE,gBAAgB,EAC5B,GAAG,EAAE,MAAM,EACX,QAAQ,CAAC,EAAE,cAAc,EACzB,sBAAsB,CAAC,EAAE,sBAAsB;IAMjD,IAAI,gBAAgB,IAAI,OAAO,CAE9B;IAED,IAAI,gBAAgB,qBAOnB;IAED,gBAAgB;IAChB,QAAQ,CAAC,KAAK,EAAE,OAAO;IAavB,MAAM,IAAI,gBAAgB;IAC1B,MAAM,CAAC,OAAO,EAAE,gBAAgB,GAAG,gBAAgB;IAoBnD;;;;OAIG;IACH,kBAAkB,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