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,248 +1,256 @@
1
- import type { Track } from './Track';
2
- export interface TrackPublishDefaults {
3
- /**
4
- * encoding parameters for camera track
5
- */
6
- videoEncoding?: VideoEncoding;
7
- /**
8
- * @experimental
9
- */
10
- backupCodec?: {
11
- codec: BackupVideoCodec;
12
- encoding: VideoEncoding;
13
- } | false;
14
- /**
15
- * encoding parameters for screen share track
16
- */
17
- screenShareEncoding?: VideoEncoding;
18
- /**
19
- * codec, defaults to vp8; for svc codecs, auto enable vp8
20
- * as backup. (TBD)
21
- */
22
- videoCodec?: VideoCodec;
23
- /**
24
- * max audio bitrate, defaults to [[AudioPresets.speech]]
25
- */
26
- audioBitrate?: number;
27
- /**
28
- * dtx (Discontinuous Transmission of audio), enabled by default for mono tracks.
29
- */
30
- dtx?: boolean;
31
- /**
32
- * red (Redundant Audio Data), enabled by default for mono tracks.
33
- */
34
- red?: boolean;
35
- /**
36
- * stereo audio track. defaults determined by capture channel count.
37
- */
38
- forceStereo?: boolean;
39
- /**
40
- * use simulcast, defaults to true.
41
- * When using simulcast, LiveKit will publish up to three versions of the stream
42
- * at various resolutions.
43
- */
44
- simulcast?: boolean;
45
- /**
46
- * scalability mode for svc codecs, defaults to 'L3T3'.
47
- * for svc codecs, simulcast is disabled.
48
- */
49
- scalabilityMode?: ScalabilityMode;
50
- /**
51
- * custom video simulcast layers for camera tracks, defaults to h180, h360
52
- * You can specify up to two custom layers that will be used instead of
53
- * the LiveKit default layers.
54
- * Note: the layers need to be ordered from lowest to highest quality
55
- */
56
- videoSimulcastLayers?: Array<VideoPreset>;
57
- /**
58
- * custom video simulcast layers for screen tracks
59
- * Note: the layers need to be ordered from lowest to highest quality
60
- */
61
- screenShareSimulcastLayers?: Array<VideoPreset>;
62
- /**
63
- * For local tracks, stop the underlying MediaStreamTrack when the track is muted (or paused)
64
- * on some platforms, this option is necessary to disable the microphone recording indicator.
65
- * Note: when this is enabled, and BT devices are connected, they will transition between
66
- * profiles (e.g. HFP to A2DP) and there will be an audible difference in playback.
67
- *
68
- * defaults to false
69
- */
70
- stopMicTrackOnMute?: boolean;
71
- }
72
- /**
73
- * Options when publishing tracks
74
- */
75
- export interface TrackPublishOptions extends TrackPublishDefaults {
76
- /**
77
- * set a track name
78
- */
79
- name?: string;
80
- /**
81
- * Source of track, camera, microphone, or screen
82
- */
83
- source?: Track.Source;
84
- }
85
- export interface CreateLocalTracksOptions {
86
- /**
87
- * audio track options, true to create with defaults. false if audio shouldn't be created
88
- * default true
89
- */
90
- audio?: boolean | AudioCaptureOptions;
91
- /**
92
- * video track options, true to create with defaults. false if video shouldn't be created
93
- * default true
94
- */
95
- video?: boolean | VideoCaptureOptions;
96
- }
97
- export interface VideoCaptureOptions {
98
- /**
99
- * A ConstrainDOMString object specifying a device ID or an array of device
100
- * IDs which are acceptable and/or required.
101
- */
102
- deviceId?: ConstrainDOMString;
103
- /**
104
- * a facing or an array of facings which are acceptable and/or required.
105
- */
106
- facingMode?: 'user' | 'environment' | 'left' | 'right';
107
- resolution?: VideoResolution;
108
- }
109
- export interface ScreenShareCaptureOptions {
110
- /**
111
- * true to capture audio shared. browser support for audio capturing in
112
- * screenshare is limited: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia#browser_compatibility
113
- */
114
- audio?: boolean | AudioCaptureOptions;
115
- /** capture resolution, defaults to full HD */
116
- resolution?: VideoResolution;
117
- /** a CaptureController object instance containing methods that can be used to further manipulate the capture session if included. */
118
- controller?: unknown;
119
- /** specifies whether the browser should allow the user to select the current tab for capture */
120
- selfBrowserSurface?: 'include' | 'exclude';
121
- /** specifies whether the browser should display a control to allow the user to dynamically switch the shared tab during screen-sharing. */
122
- surfaceSwitching?: 'include' | 'exclude';
123
- /** specifies whether the browser should include the system audio among the possible audio sources offered to the user */
124
- systemAudio?: 'include' | 'exclude';
125
- /**
126
- * Experimental option to control whether the audio playing in a tab will continue to be played out of a user's
127
- * local speakers when the tab is captured.
128
- */
129
- suppressLocalAudioPlayback?: boolean;
130
- }
131
- export interface AudioCaptureOptions {
132
- /**
133
- * specifies whether automatic gain control is preferred and/or required
134
- */
135
- autoGainControl?: ConstrainBoolean;
136
- /**
137
- * the channel count or range of channel counts which are acceptable and/or required
138
- */
139
- channelCount?: ConstrainULong;
140
- /**
141
- * A ConstrainDOMString object specifying a device ID or an array of device
142
- * IDs which are acceptable and/or required.
143
- */
144
- deviceId?: ConstrainDOMString;
145
- /**
146
- * whether or not echo cancellation is preferred and/or required
147
- */
148
- echoCancellation?: ConstrainBoolean;
149
- /**
150
- * the latency or range of latencies which are acceptable and/or required.
151
- */
152
- latency?: ConstrainDouble;
153
- /**
154
- * whether noise suppression is preferred and/or required.
155
- */
156
- noiseSuppression?: ConstrainBoolean;
157
- /**
158
- * the sample rate or range of sample rates which are acceptable and/or required.
159
- */
160
- sampleRate?: ConstrainULong;
161
- /**
162
- * sample size or range of sample sizes which are acceptable and/or required.
163
- */
164
- sampleSize?: ConstrainULong;
165
- }
166
- export interface AudioOutputOptions {
167
- /**
168
- * deviceId to output audio
169
- *
170
- * Only supported on browsers where `setSinkId` is available
171
- */
172
- deviceId?: string;
173
- }
174
- export interface VideoResolution {
175
- width: number;
176
- height: number;
177
- frameRate?: number;
178
- aspectRatio?: number;
179
- }
180
- export interface VideoEncoding {
181
- maxBitrate: number;
182
- maxFramerate?: number;
183
- }
184
- export declare class VideoPreset {
185
- encoding: VideoEncoding;
186
- width: number;
187
- height: number;
188
- constructor(width: number, height: number, maxBitrate: number, maxFramerate?: number);
189
- get resolution(): VideoResolution;
190
- }
191
- export interface AudioPreset {
192
- maxBitrate: number;
193
- }
194
- declare const codecs: readonly ["vp8", "h264", "vp9", "av1"];
195
- declare const backupCodecs: readonly ["vp8", "h264"];
196
- export type VideoCodec = (typeof codecs)[number];
197
- export type BackupVideoCodec = (typeof backupCodecs)[number];
198
- export declare function isBackupCodec(codec: string): codec is BackupVideoCodec;
199
- export declare function isCodecEqual(c1: string | undefined, c2: string | undefined): boolean;
200
- /**
201
- * scalability modes for svc, only supprot l3t3 now.
202
- */
203
- export type ScalabilityMode = 'L3T3';
204
- export declare namespace AudioPresets {
205
- const telephone: AudioPreset;
206
- const speech: AudioPreset;
207
- const music: AudioPreset;
208
- const musicStereo: AudioPreset;
209
- const musicHighQuality: AudioPreset;
210
- const musicHighQualityStereo: AudioPreset;
211
- }
212
- /**
213
- * Sane presets for video resolution/encoding
214
- */
215
- export declare const VideoPresets: {
216
- readonly h90: VideoPreset;
217
- readonly h180: VideoPreset;
218
- readonly h216: VideoPreset;
219
- readonly h360: VideoPreset;
220
- readonly h540: VideoPreset;
221
- readonly h720: VideoPreset;
222
- readonly h1080: VideoPreset;
223
- readonly h1440: VideoPreset;
224
- readonly h2160: VideoPreset;
225
- };
226
- /**
227
- * Four by three presets
228
- */
229
- export declare const VideoPresets43: {
230
- readonly h120: VideoPreset;
231
- readonly h180: VideoPreset;
232
- readonly h240: VideoPreset;
233
- readonly h360: VideoPreset;
234
- readonly h480: VideoPreset;
235
- readonly h540: VideoPreset;
236
- readonly h720: VideoPreset;
237
- readonly h1080: VideoPreset;
238
- readonly h1440: VideoPreset;
239
- };
240
- export declare const ScreenSharePresets: {
241
- readonly h360fps3: VideoPreset;
242
- readonly h720fps5: VideoPreset;
243
- readonly h720fps15: VideoPreset;
244
- readonly h1080fps15: VideoPreset;
245
- readonly h1080fps30: VideoPreset;
246
- };
247
- export {};
1
+ import type { Track } from './Track';
2
+ export interface TrackPublishDefaults {
3
+ /**
4
+ * encoding parameters for camera track
5
+ */
6
+ videoEncoding?: VideoEncoding;
7
+ /**
8
+ * @experimental
9
+ */
10
+ backupCodec?: {
11
+ codec: BackupVideoCodec;
12
+ encoding: VideoEncoding;
13
+ } | false;
14
+ /**
15
+ * encoding parameters for screen share track
16
+ */
17
+ screenShareEncoding?: VideoEncoding;
18
+ /**
19
+ * codec, defaults to vp8; for svc codecs, auto enable vp8
20
+ * as backup. (TBD)
21
+ */
22
+ videoCodec?: VideoCodec;
23
+ /**
24
+ * max audio bitrate, defaults to [[AudioPresets.music]]
25
+ * @deprecated use `audioPreset` instead
26
+ */
27
+ audioBitrate?: number;
28
+ /**
29
+ * which audio preset should be used for publishing (audio) tracks
30
+ * defaults to [[AudioPresets.music]]
31
+ */
32
+ audioPreset?: AudioPreset;
33
+ /**
34
+ * dtx (Discontinuous Transmission of audio), enabled by default for mono tracks.
35
+ */
36
+ dtx?: boolean;
37
+ /**
38
+ * red (Redundant Audio Data), enabled by default for mono tracks.
39
+ */
40
+ red?: boolean;
41
+ /**
42
+ * stereo audio track. defaults determined by capture channel count.
43
+ */
44
+ forceStereo?: boolean;
45
+ /**
46
+ * use simulcast, defaults to true.
47
+ * When using simulcast, LiveKit will publish up to three versions of the stream
48
+ * at various resolutions.
49
+ */
50
+ simulcast?: boolean;
51
+ /**
52
+ * scalability mode for svc codecs, defaults to 'L3T3'.
53
+ * for svc codecs, simulcast is disabled.
54
+ */
55
+ scalabilityMode?: ScalabilityMode;
56
+ /**
57
+ * custom video simulcast layers for camera tracks, defaults to h180, h360
58
+ * You can specify up to two custom layers that will be used instead of
59
+ * the LiveKit default layers.
60
+ * Note: the layers need to be ordered from lowest to highest quality
61
+ */
62
+ videoSimulcastLayers?: Array<VideoPreset>;
63
+ /**
64
+ * custom video simulcast layers for screen tracks
65
+ * Note: the layers need to be ordered from lowest to highest quality
66
+ */
67
+ screenShareSimulcastLayers?: Array<VideoPreset>;
68
+ /**
69
+ * For local tracks, stop the underlying MediaStreamTrack when the track is muted (or paused)
70
+ * on some platforms, this option is necessary to disable the microphone recording indicator.
71
+ * Note: when this is enabled, and BT devices are connected, they will transition between
72
+ * profiles (e.g. HFP to A2DP) and there will be an audible difference in playback.
73
+ *
74
+ * defaults to false
75
+ */
76
+ stopMicTrackOnMute?: boolean;
77
+ }
78
+ /**
79
+ * Options when publishing tracks
80
+ */
81
+ export interface TrackPublishOptions extends TrackPublishDefaults {
82
+ /**
83
+ * set a track name
84
+ */
85
+ name?: string;
86
+ /**
87
+ * Source of track, camera, microphone, or screen
88
+ */
89
+ source?: Track.Source;
90
+ }
91
+ export interface CreateLocalTracksOptions {
92
+ /**
93
+ * audio track options, true to create with defaults. false if audio shouldn't be created
94
+ * default true
95
+ */
96
+ audio?: boolean | AudioCaptureOptions;
97
+ /**
98
+ * video track options, true to create with defaults. false if video shouldn't be created
99
+ * default true
100
+ */
101
+ video?: boolean | VideoCaptureOptions;
102
+ }
103
+ export interface VideoCaptureOptions {
104
+ /**
105
+ * A ConstrainDOMString object specifying a device ID or an array of device
106
+ * IDs which are acceptable and/or required.
107
+ */
108
+ deviceId?: ConstrainDOMString;
109
+ /**
110
+ * a facing or an array of facings which are acceptable and/or required.
111
+ */
112
+ facingMode?: 'user' | 'environment' | 'left' | 'right';
113
+ resolution?: VideoResolution;
114
+ }
115
+ export interface ScreenShareCaptureOptions {
116
+ /**
117
+ * true to capture audio shared. browser support for audio capturing in
118
+ * screenshare is limited: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia#browser_compatibility
119
+ */
120
+ audio?: boolean | AudioCaptureOptions;
121
+ /** capture resolution, defaults to full HD */
122
+ resolution?: VideoResolution;
123
+ /** a CaptureController object instance containing methods that can be used to further manipulate the capture session if included. */
124
+ controller?: unknown;
125
+ /** specifies whether the browser should allow the user to select the current tab for capture */
126
+ selfBrowserSurface?: 'include' | 'exclude';
127
+ /** specifies whether the browser should display a control to allow the user to dynamically switch the shared tab during screen-sharing. */
128
+ surfaceSwitching?: 'include' | 'exclude';
129
+ /** specifies whether the browser should include the system audio among the possible audio sources offered to the user */
130
+ systemAudio?: 'include' | 'exclude';
131
+ /**
132
+ * Experimental option to control whether the audio playing in a tab will continue to be played out of a user's
133
+ * local speakers when the tab is captured.
134
+ */
135
+ suppressLocalAudioPlayback?: boolean;
136
+ }
137
+ export interface AudioCaptureOptions {
138
+ /**
139
+ * specifies whether automatic gain control is preferred and/or required
140
+ */
141
+ autoGainControl?: ConstrainBoolean;
142
+ /**
143
+ * the channel count or range of channel counts which are acceptable and/or required
144
+ */
145
+ channelCount?: ConstrainULong;
146
+ /**
147
+ * A ConstrainDOMString object specifying a device ID or an array of device
148
+ * IDs which are acceptable and/or required.
149
+ */
150
+ deviceId?: ConstrainDOMString;
151
+ /**
152
+ * whether or not echo cancellation is preferred and/or required
153
+ */
154
+ echoCancellation?: ConstrainBoolean;
155
+ /**
156
+ * the latency or range of latencies which are acceptable and/or required.
157
+ */
158
+ latency?: ConstrainDouble;
159
+ /**
160
+ * whether noise suppression is preferred and/or required.
161
+ */
162
+ noiseSuppression?: ConstrainBoolean;
163
+ /**
164
+ * the sample rate or range of sample rates which are acceptable and/or required.
165
+ */
166
+ sampleRate?: ConstrainULong;
167
+ /**
168
+ * sample size or range of sample sizes which are acceptable and/or required.
169
+ */
170
+ sampleSize?: ConstrainULong;
171
+ }
172
+ export interface AudioOutputOptions {
173
+ /**
174
+ * deviceId to output audio
175
+ *
176
+ * Only supported on browsers where `setSinkId` is available
177
+ */
178
+ deviceId?: string;
179
+ }
180
+ export interface VideoResolution {
181
+ width: number;
182
+ height: number;
183
+ frameRate?: number;
184
+ aspectRatio?: number;
185
+ }
186
+ export interface VideoEncoding {
187
+ maxBitrate: number;
188
+ maxFramerate?: number;
189
+ priority?: RTCPriorityType;
190
+ }
191
+ export declare class VideoPreset {
192
+ encoding: VideoEncoding;
193
+ width: number;
194
+ height: number;
195
+ constructor(width: number, height: number, maxBitrate: number, maxFramerate?: number, priority?: RTCPriorityType);
196
+ get resolution(): VideoResolution;
197
+ }
198
+ export interface AudioPreset {
199
+ maxBitrate: number;
200
+ priority?: RTCPriorityType;
201
+ }
202
+ declare const codecs: readonly ["vp8", "h264", "vp9", "av1"];
203
+ declare const backupCodecs: readonly ["vp8", "h264"];
204
+ export type VideoCodec = (typeof codecs)[number];
205
+ export type BackupVideoCodec = (typeof backupCodecs)[number];
206
+ export declare function isBackupCodec(codec: string): codec is BackupVideoCodec;
207
+ export declare function isCodecEqual(c1: string | undefined, c2: string | undefined): boolean;
208
+ /**
209
+ * scalability modes for svc, only supprot l3t3 now.
210
+ */
211
+ export type ScalabilityMode = 'L3T3';
212
+ export declare namespace AudioPresets {
213
+ const telephone: AudioPreset;
214
+ const speech: AudioPreset;
215
+ const music: AudioPreset;
216
+ const musicStereo: AudioPreset;
217
+ const musicHighQuality: AudioPreset;
218
+ const musicHighQualityStereo: AudioPreset;
219
+ }
220
+ /**
221
+ * Sane presets for video resolution/encoding
222
+ */
223
+ export declare const VideoPresets: {
224
+ readonly h90: VideoPreset;
225
+ readonly h180: VideoPreset;
226
+ readonly h216: VideoPreset;
227
+ readonly h360: VideoPreset;
228
+ readonly h540: VideoPreset;
229
+ readonly h720: VideoPreset;
230
+ readonly h1080: VideoPreset;
231
+ readonly h1440: VideoPreset;
232
+ readonly h2160: VideoPreset;
233
+ };
234
+ /**
235
+ * Four by three presets
236
+ */
237
+ export declare const VideoPresets43: {
238
+ readonly h120: VideoPreset;
239
+ readonly h180: VideoPreset;
240
+ readonly h240: VideoPreset;
241
+ readonly h360: VideoPreset;
242
+ readonly h480: VideoPreset;
243
+ readonly h540: VideoPreset;
244
+ readonly h720: VideoPreset;
245
+ readonly h1080: VideoPreset;
246
+ readonly h1440: VideoPreset;
247
+ };
248
+ export declare const ScreenSharePresets: {
249
+ readonly h360fps3: VideoPreset;
250
+ readonly h720fps5: VideoPreset;
251
+ readonly h720fps15: VideoPreset;
252
+ readonly h1080fps15: VideoPreset;
253
+ readonly h1080fps30: VideoPreset;
254
+ };
255
+ export {};
248
256
  //# sourceMappingURL=options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../../../src/room/track/options.ts"],"names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G,SAAS,EAAE,EAAE,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAKpF;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC;AAErC,yBAAiB,YAAY,CAAC;IACrB,MAAM,SAAS,EAAE,WAEvB,CAAC;IACK,MAAM,MAAM,EAAE,WAEpB,CAAC;IACK,MAAM,KAAK,EAAE,WAEnB,CAAC;IACK,MAAM,WAAW,EAAE,WAEzB,CAAC;IACK,MAAM,gBAAgB,EAAE,WAE9B,CAAC;IACK,MAAM,sBAAsB,EAAE,WAEpC,CAAC;CACH;AAED;;GAEG;AACH,eAAO,MAAM,YAAY;;;;;;;;;;CAUf,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;;;CAUjB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;;CAMrB,CAAC"}
@@ -1,23 +1,23 @@
1
- import type LocalAudioTrack from './LocalAudioTrack';
2
- import type LocalVideoTrack from './LocalVideoTrack';
3
- import type RemoteAudioTrack from './RemoteAudioTrack';
4
- import type RemoteVideoTrack from './RemoteVideoTrack';
5
- export type AudioTrack = RemoteAudioTrack | LocalAudioTrack;
6
- export type VideoTrack = RemoteVideoTrack | LocalVideoTrack;
7
- export type AdaptiveStreamSettings = {
8
- /**
9
- * Set a custom pixel density, defaults to 1
10
- * When streaming videos on a ultra high definition screen this setting
11
- * let's you account for the devicePixelRatio of those screens.
12
- * Set it to `screen` to use the actual pixel density of the screen
13
- * Note: this might significantly increase the bandwidth consumed by people
14
- * streaming on high definition screens.
15
- */
16
- pixelDensity?: number | 'screen';
17
- /**
18
- * If true, video gets paused when switching to another tab.
19
- * Defaults to true.
20
- */
21
- pauseVideoInBackground?: boolean;
22
- };
1
+ import type LocalAudioTrack from './LocalAudioTrack';
2
+ import type LocalVideoTrack from './LocalVideoTrack';
3
+ import type RemoteAudioTrack from './RemoteAudioTrack';
4
+ import type RemoteVideoTrack from './RemoteVideoTrack';
5
+ export type AudioTrack = RemoteAudioTrack | LocalAudioTrack;
6
+ export type VideoTrack = RemoteVideoTrack | LocalVideoTrack;
7
+ export type AdaptiveStreamSettings = {
8
+ /**
9
+ * Set a custom pixel density, defaults to 1
10
+ * When streaming videos on a ultra high definition screen this setting
11
+ * let's you account for the devicePixelRatio of those screens.
12
+ * Set it to `screen` to use the actual pixel density of the screen
13
+ * Note: this might significantly increase the bandwidth consumed by people
14
+ * streaming on high definition screens.
15
+ */
16
+ pixelDensity?: number | 'screen';
17
+ /**
18
+ * If true, video gets paused when switching to another tab.
19
+ * Defaults to true.
20
+ */
21
+ pauseVideoInBackground?: boolean;
22
+ };
23
23
  //# sourceMappingURL=types.d.ts.map
@@ -1,14 +1,14 @@
1
- import type { AudioCaptureOptions, CreateLocalTracksOptions, VideoCaptureOptions } from './options';
2
- import type { AudioTrack } from './types';
3
- export declare function mergeDefaultOptions(options?: CreateLocalTracksOptions, audioDefaults?: AudioCaptureOptions, videoDefaults?: VideoCaptureOptions): CreateLocalTracksOptions;
4
- export declare function constraintsForOptions(options: CreateLocalTracksOptions): MediaStreamConstraints;
5
- /**
6
- * This function detects silence on a given [[Track]] instance.
7
- * Returns true if the track seems to be entirely silent.
8
- */
9
- export declare function detectSilence(track: AudioTrack, timeOffset?: number): Promise<boolean>;
10
- /**
11
- * @internal
12
- */
13
- export declare function getNewAudioContext(): AudioContext | void;
1
+ import type { AudioCaptureOptions, CreateLocalTracksOptions, VideoCaptureOptions } from './options';
2
+ import type { AudioTrack } from './types';
3
+ export declare function mergeDefaultOptions(options?: CreateLocalTracksOptions, audioDefaults?: AudioCaptureOptions, videoDefaults?: VideoCaptureOptions): CreateLocalTracksOptions;
4
+ export declare function constraintsForOptions(options: CreateLocalTracksOptions): MediaStreamConstraints;
5
+ /**
6
+ * This function detects silence on a given [[Track]] instance.
7
+ * Returns true if the track seems to be entirely silent.
8
+ */
9
+ export declare function detectSilence(track: AudioTrack, timeOffset?: number): Promise<boolean>;
10
+ /**
11
+ * @internal
12
+ */
13
+ export declare function getNewAudioContext(): AudioContext | void;
14
14
  //# sourceMappingURL=utils.d.ts.map