livekit-client 2.22.2 → 2.22.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/README.md +35 -0
  2. package/dist/livekit-client.e2ee.worker.js +1 -1
  3. package/dist/livekit-client.e2ee.worker.js.map +1 -1
  4. package/dist/livekit-client.e2ee.worker.mjs +488 -438
  5. package/dist/livekit-client.e2ee.worker.mjs.map +1 -1
  6. package/dist/livekit-client.esm.mjs +954 -301
  7. package/dist/livekit-client.esm.mjs.map +1 -1
  8. package/dist/livekit-client.fm.worker.js +1 -1
  9. package/dist/livekit-client.fm.worker.js.map +1 -1
  10. package/dist/livekit-client.fm.worker.mjs +10 -2
  11. package/dist/livekit-client.fm.worker.mjs.map +1 -1
  12. package/dist/livekit-client.umd.js +1 -1
  13. package/dist/livekit-client.umd.js.map +1 -1
  14. package/dist/src/api/SignalClient.d.ts +4 -2
  15. package/dist/src/api/SignalClient.d.ts.map +1 -1
  16. package/dist/src/api/WebSocketStream.d.ts.map +1 -1
  17. package/dist/src/api/utils.d.ts +1 -0
  18. package/dist/src/api/utils.d.ts.map +1 -1
  19. package/dist/src/e2ee/E2eeManager.d.ts +26 -0
  20. package/dist/src/e2ee/E2eeManager.d.ts.map +1 -1
  21. package/dist/src/e2ee/types.d.ts +15 -1
  22. package/dist/src/e2ee/types.d.ts.map +1 -1
  23. package/dist/src/e2ee/worker/DataCryptor.d.ts.map +1 -1
  24. package/dist/src/e2ee/worker/ErrorRateLimiter.d.ts +21 -0
  25. package/dist/src/e2ee/worker/ErrorRateLimiter.d.ts.map +1 -0
  26. package/dist/src/e2ee/worker/FrameCryptor.d.ts +1 -18
  27. package/dist/src/e2ee/worker/FrameCryptor.d.ts.map +1 -1
  28. package/dist/src/logger.d.ts +4 -0
  29. package/dist/src/logger.d.ts.map +1 -1
  30. package/dist/src/options.d.ts +14 -0
  31. package/dist/src/options.d.ts.map +1 -1
  32. package/dist/src/room/PCTransport.d.ts +78 -7
  33. package/dist/src/room/PCTransport.d.ts.map +1 -1
  34. package/dist/src/room/PCTransportManager.d.ts.map +1 -1
  35. package/dist/src/room/RTCEngine.d.ts +9 -0
  36. package/dist/src/room/RTCEngine.d.ts.map +1 -1
  37. package/dist/src/room/Room.d.ts +1 -1
  38. package/dist/src/room/Room.d.ts.map +1 -1
  39. package/dist/src/room/defaults.d.ts.map +1 -1
  40. package/dist/src/room/errors.d.ts +18 -0
  41. package/dist/src/room/errors.d.ts.map +1 -1
  42. package/dist/src/room/events.d.ts +3 -2
  43. package/dist/src/room/events.d.ts.map +1 -1
  44. package/dist/src/room/participant/LocalParticipant.d.ts.map +1 -1
  45. package/dist/src/room/participant/publishUtils.d.ts +16 -0
  46. package/dist/src/room/participant/publishUtils.d.ts.map +1 -1
  47. package/dist/src/room/rpc/client/RpcClientManager.d.ts.map +1 -1
  48. package/dist/src/room/track/LocalTrack.d.ts.map +1 -1
  49. package/dist/src/room/track/LocalVideoTrack.d.ts +9 -0
  50. package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
  51. package/dist/src/room/track/options.d.ts +1 -1
  52. package/dist/src/room/track/utils.d.ts +13 -0
  53. package/dist/src/room/track/utils.d.ts.map +1 -1
  54. package/dist/src/room/utils.d.ts +66 -0
  55. package/dist/src/room/utils.d.ts.map +1 -1
  56. package/dist/src/test/compressionStreamStubs.d.ts +12 -0
  57. package/dist/src/test/compressionStreamStubs.d.ts.map +1 -0
  58. package/dist/ts4.2/api/SignalClient.d.ts +187 -185
  59. package/dist/ts4.2/api/SignalClientStateMachine.d.ts +85 -85
  60. package/dist/ts4.2/api/WebSocketStream.d.ts +33 -33
  61. package/dist/ts4.2/api/utils.d.ts +9 -8
  62. package/dist/ts4.2/connectionHelper/ConnectionCheck.d.ts +30 -30
  63. package/dist/ts4.2/connectionHelper/checks/Checker.d.ts +62 -62
  64. package/dist/ts4.2/connectionHelper/checks/cloudRegion.d.ts +18 -18
  65. package/dist/ts4.2/connectionHelper/checks/connectionProtocol.d.ts +20 -20
  66. package/dist/ts4.2/connectionHelper/checks/publishAudio.d.ts +6 -6
  67. package/dist/ts4.2/connectionHelper/checks/publishVideo.d.ts +7 -7
  68. package/dist/ts4.2/connectionHelper/checks/reconnect.d.ts +6 -6
  69. package/dist/ts4.2/connectionHelper/checks/turn.d.ts +6 -6
  70. package/dist/ts4.2/connectionHelper/checks/webrtc.d.ts +6 -6
  71. package/dist/ts4.2/connectionHelper/checks/websocket.d.ts +6 -6
  72. package/dist/ts4.2/e2ee/E2eeManager.d.ts +111 -85
  73. package/dist/ts4.2/e2ee/KeyProvider.d.ts +54 -54
  74. package/dist/ts4.2/e2ee/constants.d.ts +21 -21
  75. package/dist/ts4.2/e2ee/errors.d.ts +12 -12
  76. package/dist/ts4.2/e2ee/events.d.ts +39 -39
  77. package/dist/ts4.2/e2ee/index.d.ts +6 -6
  78. package/dist/ts4.2/e2ee/types.d.ts +231 -217
  79. package/dist/ts4.2/e2ee/utils.d.ts +32 -32
  80. package/dist/ts4.2/e2ee/worker/DataCryptor.d.ts +16 -16
  81. package/dist/ts4.2/e2ee/worker/ErrorRateLimiter.d.ts +21 -0
  82. package/dist/ts4.2/e2ee/worker/FrameCryptor.d.ts +209 -226
  83. package/dist/ts4.2/e2ee/worker/ParticipantKeyHandler.d.ts +81 -84
  84. package/dist/ts4.2/e2ee/worker/e2ee.worker.d.ts +2 -2
  85. package/dist/ts4.2/e2ee/worker/naluUtils.d.ts +28 -28
  86. package/dist/ts4.2/e2ee/worker/sifPayload.d.ts +23 -23
  87. package/dist/ts4.2/frameMetadata/FrameMetadataManager.d.ts +53 -53
  88. package/dist/ts4.2/frameMetadata/frameMetadata.d.ts +33 -33
  89. package/dist/ts4.2/frameMetadata/types.d.ts +62 -62
  90. package/dist/ts4.2/frameMetadata/utils.d.ts +9 -9
  91. package/dist/ts4.2/frameMetadata/worker/frameMetadata.worker.d.ts +2 -2
  92. package/dist/ts4.2/index.d.ts +76 -76
  93. package/dist/ts4.2/logger.d.ts +66 -62
  94. package/dist/ts4.2/options.d.ts +163 -149
  95. package/dist/ts4.2/room/BackOffStrategy.d.ts +27 -27
  96. package/dist/ts4.2/room/DefaultReconnectPolicy.d.ts +8 -8
  97. package/dist/ts4.2/room/DeviceManager.d.ts +12 -12
  98. package/dist/ts4.2/room/PCTransport.d.ts +246 -175
  99. package/dist/ts4.2/room/PCTransportManager.d.ts +77 -77
  100. package/dist/ts4.2/room/RTCEngine.d.ts +269 -261
  101. package/dist/ts4.2/room/ReconnectPolicy.d.ts +24 -24
  102. package/dist/ts4.2/room/RegionUrlProvider.d.ts +36 -36
  103. package/dist/ts4.2/room/Room.d.ts +354 -365
  104. package/dist/ts4.2/room/attribute-typings.d.ts +35 -35
  105. package/dist/ts4.2/room/data-channel/DataChannelManager.d.ts +62 -62
  106. package/dist/ts4.2/room/data-channel/FlowControlledDataChannel.d.ts +94 -95
  107. package/dist/ts4.2/room/data-channel/LossyDataChannel.d.ts +41 -41
  108. package/dist/ts4.2/room/data-channel/ReliableDataChannel.d.ts +57 -57
  109. package/dist/ts4.2/room/data-channel/types.d.ts +12 -12
  110. package/dist/ts4.2/room/data-stream/compression.d.ts +49 -49
  111. package/dist/ts4.2/room/data-stream/constants.d.ts +18 -18
  112. package/dist/ts4.2/room/data-stream/incoming/IncomingDataStreamManager.d.ts +29 -29
  113. package/dist/ts4.2/room/data-stream/incoming/StreamReader.d.ts +80 -80
  114. package/dist/ts4.2/room/data-stream/outgoing/OutgoingDataStreamManager.d.ts +73 -73
  115. package/dist/ts4.2/room/data-stream/outgoing/StreamWriter.d.ts +16 -16
  116. package/dist/ts4.2/room/data-stream/outgoing/header-utils.d.ts +18 -18
  117. package/dist/ts4.2/room/data-track/LocalDataTrack.d.ts +79 -80
  118. package/dist/ts4.2/room/data-track/RemoteDataTrack.d.ts +50 -50
  119. package/dist/ts4.2/room/data-track/depacketizer.d.ts +59 -59
  120. package/dist/ts4.2/room/data-track/frame.d.ts +22 -22
  121. package/dist/ts4.2/room/data-track/handle.d.ts +27 -27
  122. package/dist/ts4.2/room/data-track/incoming/IncomingDataTrackManager.d.ts +124 -124
  123. package/dist/ts4.2/room/data-track/incoming/errors.d.ts +24 -24
  124. package/dist/ts4.2/room/data-track/incoming/pipeline.d.ts +41 -41
  125. package/dist/ts4.2/room/data-track/incoming/types.d.ts +20 -20
  126. package/dist/ts4.2/room/data-track/outgoing/OutgoingDataTrackManager.d.ts +126 -126
  127. package/dist/ts4.2/room/data-track/outgoing/errors.d.ts +74 -74
  128. package/dist/ts4.2/room/data-track/outgoing/pipeline.d.ts +23 -23
  129. package/dist/ts4.2/room/data-track/outgoing/types.d.ts +48 -48
  130. package/dist/ts4.2/room/data-track/packet/constants.d.ts +20 -20
  131. package/dist/ts4.2/room/data-track/packet/errors.d.ts +40 -40
  132. package/dist/ts4.2/room/data-track/packet/extensions.d.ts +69 -69
  133. package/dist/ts4.2/room/data-track/packet/index.d.ts +98 -98
  134. package/dist/ts4.2/room/data-track/packet/serializable.d.ts +13 -13
  135. package/dist/ts4.2/room/data-track/packetizer.d.ts +43 -43
  136. package/dist/ts4.2/room/data-track/track-interfaces.d.ts +23 -23
  137. package/dist/ts4.2/room/data-track/types.d.ts +22 -22
  138. package/dist/ts4.2/room/data-track/utils.d.ts +60 -60
  139. package/dist/ts4.2/room/debounce.d.ts +11 -11
  140. package/dist/ts4.2/room/defaults.d.ts +9 -9
  141. package/dist/ts4.2/room/errors.d.ts +180 -162
  142. package/dist/ts4.2/room/events.d.ts +638 -637
  143. package/dist/ts4.2/room/participant/LocalParticipant.d.ts +287 -287
  144. package/dist/ts4.2/room/participant/Participant.d.ts +142 -144
  145. package/dist/ts4.2/room/participant/ParticipantTrackPermission.d.ts +26 -26
  146. package/dist/ts4.2/room/participant/RemoteParticipant.d.ts +85 -86
  147. package/dist/ts4.2/room/participant/publishUtils.d.ts +53 -37
  148. package/dist/ts4.2/room/rpc/client/RpcClientManager.d.ts +43 -43
  149. package/dist/ts4.2/room/rpc/client/events.d.ts +8 -8
  150. package/dist/ts4.2/room/rpc/index.d.ts +7 -7
  151. package/dist/ts4.2/room/rpc/server/RpcServerManager.d.ts +44 -44
  152. package/dist/ts4.2/room/rpc/server/events.d.ts +8 -8
  153. package/dist/ts4.2/room/rpc/utils.d.ts +131 -131
  154. package/dist/ts4.2/room/stats.d.ts +71 -71
  155. package/dist/ts4.2/room/statsSummary.d.ts +13 -13
  156. package/dist/ts4.2/room/timers.d.ts +12 -12
  157. package/dist/ts4.2/room/token-source/TokenSource.d.ts +82 -82
  158. package/dist/ts4.2/room/token-source/types.d.ts +70 -70
  159. package/dist/ts4.2/room/token-source/utils.d.ts +8 -8
  160. package/dist/ts4.2/room/track/FrameMetadataExtractor.d.ts +19 -19
  161. package/dist/ts4.2/room/track/LocalAudioTrack.d.ts +39 -42
  162. package/dist/ts4.2/room/track/LocalTrack.d.ts +125 -125
  163. package/dist/ts4.2/room/track/LocalTrackPublication.d.ts +42 -42
  164. package/dist/ts4.2/room/track/LocalVideoTrack.d.ts +102 -93
  165. package/dist/ts4.2/room/track/RemoteAudioTrack.d.ts +55 -55
  166. package/dist/ts4.2/room/track/RemoteTrack.d.ts +38 -38
  167. package/dist/ts4.2/room/track/RemoteTrackPublication.d.ts +72 -75
  168. package/dist/ts4.2/room/track/RemoteVideoTrack.d.ts +73 -76
  169. package/dist/ts4.2/room/track/Track.d.ts +156 -166
  170. package/dist/ts4.2/room/track/TrackPublication.d.ts +75 -81
  171. package/dist/ts4.2/room/track/create.d.ts +25 -25
  172. package/dist/ts4.2/room/track/facingMode.d.ts +41 -41
  173. package/dist/ts4.2/room/track/options.d.ts +403 -403
  174. package/dist/ts4.2/room/track/processor/types.d.ts +31 -31
  175. package/dist/ts4.2/room/track/record.d.ts +13 -13
  176. package/dist/ts4.2/room/track/types.d.ts +28 -28
  177. package/dist/ts4.2/room/track/utils.d.ts +60 -47
  178. package/dist/ts4.2/room/types.d.ts +127 -127
  179. package/dist/ts4.2/room/utils.d.ts +246 -180
  180. package/dist/ts4.2/test/MockMediaStreamTrack.d.ts +26 -26
  181. package/dist/ts4.2/test/compressionStreamStubs.d.ts +12 -0
  182. package/dist/ts4.2/test/mocks.d.ts +12 -12
  183. package/dist/ts4.2/test/promiseState.d.ts +12 -12
  184. package/dist/ts4.2/test/signalToken.d.ts +26 -26
  185. package/dist/ts4.2/type-polyfills/non-shared-typed-arrays.d.ts +2 -2
  186. package/dist/ts4.2/utils/AsyncQueue.d.ts +23 -23
  187. package/dist/ts4.2/utils/TypedPromise.d.ts +17 -17
  188. package/dist/ts4.2/utils/abort-signal-polyfill.d.ts +13 -13
  189. package/dist/ts4.2/utils/browserParser.d.ts +13 -13
  190. package/dist/ts4.2/utils/camelToSnakeCase.d.ts +8 -8
  191. package/dist/ts4.2/utils/cloneDeep.d.ts +2 -2
  192. package/dist/ts4.2/utils/dataPacketBuffer.d.ts +34 -34
  193. package/dist/ts4.2/utils/deferrable-map.d.ts +32 -32
  194. package/dist/ts4.2/utils/machineInspector.d.ts +54 -54
  195. package/dist/ts4.2/utils/serializer.d.ts +48 -48
  196. package/dist/ts4.2/utils/subscribeToEvents.d.ts +15 -15
  197. package/dist/ts4.2/utils/ttlmap.d.ts +20 -20
  198. package/dist/ts4.2/version.d.ts +15 -15
  199. package/package.json +5 -4
  200. package/src/api/SignalClient.e2e.test.ts +1 -3
  201. package/src/api/SignalClient.test.ts +160 -10
  202. package/src/api/SignalClient.ts +75 -54
  203. package/src/api/WebSocketStream.ts +3 -8
  204. package/src/api/utils.ts +10 -0
  205. package/src/e2ee/E2eeManager.test.ts +196 -0
  206. package/src/e2ee/E2eeManager.ts +114 -19
  207. package/src/e2ee/types.ts +19 -1
  208. package/src/e2ee/worker/DataCryptor.ts +2 -1
  209. package/src/e2ee/worker/ErrorRateLimiter.test.ts +53 -0
  210. package/src/e2ee/worker/ErrorRateLimiter.ts +52 -0
  211. package/src/e2ee/worker/FrameCryptor.ts +20 -70
  212. package/src/e2ee/worker/e2ee.worker.ts +34 -11
  213. package/src/logger.ts +22 -0
  214. package/src/options.ts +16 -0
  215. package/src/room/PCTransport.test.ts +183 -7
  216. package/src/room/PCTransport.ts +197 -36
  217. package/src/room/PCTransportManager.ts +3 -1
  218. package/src/room/RTCEngine.test.ts +84 -0
  219. package/src/room/RTCEngine.ts +52 -12
  220. package/src/room/Room.test.ts +32 -6
  221. package/src/room/Room.ts +27 -7
  222. package/src/room/data-stream/incoming/IncomingDataStreamManager.test.ts +16 -20
  223. package/src/room/data-stream/incoming/IncomingDataStreamManager.ts +5 -5
  224. package/src/room/data-stream/outgoing/OutgoingDataStreamManager.test.ts +60 -39
  225. package/src/room/data-stream/outgoing/OutgoingDataStreamManager.ts +4 -4
  226. package/src/room/defaults.ts +1 -0
  227. package/src/room/errors.test.ts +36 -0
  228. package/src/room/errors.ts +27 -0
  229. package/src/room/events.ts +2 -1
  230. package/src/room/participant/LocalParticipant.ts +30 -14
  231. package/src/room/participant/publishUtils.test.ts +133 -0
  232. package/src/room/participant/publishUtils.ts +54 -38
  233. package/src/room/rpc/client/RpcClientManager.test.ts +51 -0
  234. package/src/room/rpc/client/RpcClientManager.ts +32 -15
  235. package/src/room/track/LocalTrack.ts +18 -7
  236. package/src/room/track/LocalVideoTrack.ts +25 -8
  237. package/src/room/track/RemoteAudioTrack.ts +3 -3
  238. package/src/room/track/RemoteVideoTrack.test.ts +210 -0
  239. package/src/room/track/RemoteVideoTrack.ts +29 -3
  240. package/src/room/track/options.ts +1 -1
  241. package/src/room/track/utils.test.ts +201 -2
  242. package/src/room/track/utils.ts +88 -0
  243. package/src/room/utils.test.ts +211 -0
  244. package/src/room/utils.ts +129 -0
  245. package/src/test/compressionStreamStubs.ts +53 -0
@@ -1,403 +1,403 @@
1
- import type { FrameMetadataPublishOptions } from '../../frameMetadata/types';
2
- import type { Track } from './Track';
3
- import type { AudioProcessorOptions, TrackProcessor, VideoProcessorOptions } from './processor/types';
4
- export interface TrackPublishDefaults {
5
- /**
6
- * encoding parameters for camera track
7
- */
8
- videoEncoding?: VideoEncoding;
9
- /**
10
- * Advanced codecs (VP9/AV1/H265) are not supported by all browser clients. When backupCodec is
11
- * set, when an incompatible client attempts to subscribe to the track, LiveKit
12
- * will automatically publish a secondary track encoded with the backup codec.
13
- *
14
- * You could customize specific encoding parameters of the backup track by
15
- * explicitly setting codec and encoding fields.
16
- *
17
- * Defaults to `true`
18
- */
19
- backupCodec?: true | false | {
20
- codec: BackupVideoCodec;
21
- encoding?: VideoEncoding;
22
- };
23
- /**
24
- * When backup codec is enabled, there are two options to decide whether to
25
- * send the primary codec at the same time:
26
- * * codec regression: publisher stops sending primary codec and all subscribers
27
- * will receive backup codec even if the primary codec is supported on their browser. It is the default
28
- * behavior and provides maximum compatibility. It also reduces CPU
29
- * and bandwidth consumption for publisher.
30
- * * multi-codec simulcast: publisher encodes and sends both codecs at same time,
31
- * subscribers will get most efficient codec. It will provide most bandwidth
32
- * efficiency, especially in the large 1:N room but requires more device performance
33
- * and bandwidth consumption for publisher.
34
- */
35
- backupCodecPolicy?: BackupCodecPolicy;
36
- /**
37
- * encoding parameters for screen share track
38
- */
39
- screenShareEncoding?: VideoEncoding;
40
- /**
41
- * codec, defaults to vp8; for svc codecs, auto enable vp8
42
- * as backup. (TBD)
43
- */
44
- videoCodec?: VideoCodec;
45
- /**
46
- * which audio preset should be used for publishing (audio) tracks
47
- * defaults to [[AudioPresets.music]]
48
- */
49
- audioPreset?: AudioPreset;
50
- /**
51
- * dtx (Discontinuous Transmission of audio), enabled by default for mono tracks.
52
- */
53
- dtx?: boolean;
54
- /**
55
- * red (Redundant Audio Data), enabled by default for mono tracks.
56
- */
57
- red?: boolean;
58
- /**
59
- * publish track in stereo mode (or set to false to disable). defaults determined by capture channel count.
60
- */
61
- forceStereo?: boolean;
62
- /**
63
- * use simulcast, defaults to true.
64
- * When using simulcast, LiveKit will publish up to three versions of the stream
65
- * at various resolutions.
66
- */
67
- simulcast?: boolean;
68
- /**
69
- * scalability mode for svc codecs, defaults to 'L3T3_KEY'.
70
- * for svc codecs, simulcast is disabled.
71
- */
72
- scalabilityMode?: ScalabilityMode;
73
- /**
74
- * Controls how the encoder trades off between resolution and framerate
75
- * when bandwidth is constrained.
76
- *
77
- * - 'maintain-framerate': Prioritizes framerate, reduces resolution if needed
78
- * - 'maintain-resolution': Prioritizes resolution, drops frames if needed
79
- * - 'balanced': Balances between both
80
- *
81
- * If not set, the SDK uses defaults based on track source:
82
- * - Camera: 'maintain-framerate' (smoother video for real-time communication)
83
- * - Screen share: 'maintain-resolution' (clarity is critical for text/UI)
84
- * - Other/unknown: 'balanced'
85
- */
86
- degradationPreference?: RTCDegradationPreference;
87
- /**
88
- * Up to two additional simulcast layers to publish in addition to the original
89
- * Track.
90
- * When left blank, it defaults to h180, h360.
91
- * If a SVC codec is used (VP9 or AV1), this field has no effect.
92
- *
93
- * To publish three total layers, you would specify:
94
- * {
95
- * videoEncoding: {...}, // encoding of the primary layer
96
- * videoSimulcastLayers: [
97
- * VideoPresets.h540,
98
- * VideoPresets.h216,
99
- * ],
100
- * }
101
- */
102
- videoSimulcastLayers?: Array<VideoPreset>;
103
- /**
104
- * custom video simulcast layers for screen tracks
105
- * Note: the layers need to be ordered from lowest to highest quality
106
- */
107
- screenShareSimulcastLayers?: Array<VideoPreset>;
108
- /**
109
- * For local tracks, stop the underlying MediaStreamTrack when the track is muted (or paused)
110
- * on some platforms, this option is necessary to disable the microphone recording indicator.
111
- * Note: when this is enabled, and BT devices are connected, they will transition between
112
- * profiles (e.g. HFP to A2DP) and there will be an audible difference in playback.
113
- *
114
- * defaults to false
115
- */
116
- stopMicTrackOnMute?: boolean;
117
- /**
118
- * Enables preconnect buffer for a user's microphone track.
119
- * This is useful for reducing perceived latency when the user starts to speak before the connection is established.
120
- * Only works for agent use cases.
121
- *
122
- * Defaults to false.
123
- */
124
- preConnectBuffer?: boolean;
125
- /**
126
- * Frame metadata to append to published video frames.
127
- *
128
- * Requires either room-level frame metadata worker configuration or E2EE,
129
- * because encoded frame transforms are used to write the metadata.
130
- *
131
- * @experimental
132
- */
133
- frameMetadata?: FrameMetadataPublishOptions;
134
- /**
135
- * @deprecated Use {@link TrackPublishDefaults.frameMetadata} instead.
136
- */
137
- packetTrailer?: FrameMetadataPublishOptions;
138
- }
139
- /**
140
- * Options when publishing tracks
141
- */
142
- export interface TrackPublishOptions extends TrackPublishDefaults {
143
- /**
144
- * set a track name
145
- */
146
- name?: string;
147
- /**
148
- * Source of track, camera, microphone, or screen
149
- */
150
- source?: Track.Source;
151
- /**
152
- * Set stream name for the track. Audio and video tracks with the same stream name
153
- * will be placed in the same `MediaStream` and offer better synchronization.
154
- * By default, camera and microphone will be placed in a stream; as would screen_share and screen_share_audio
155
- */
156
- stream?: string;
157
- }
158
- export interface CreateLocalTracksOptions {
159
- /**
160
- * audio track options, true to create with defaults. false if audio shouldn't be created
161
- * default true
162
- */
163
- audio?: boolean | AudioCaptureOptions;
164
- /**
165
- * video track options, true to create with defaults. false if video shouldn't be created
166
- * default true
167
- */
168
- video?: boolean | VideoCaptureOptions;
169
- }
170
- export interface VideoCaptureOptions {
171
- /**
172
- * A ConstrainDOMString object specifying a device ID or an array of device
173
- * IDs which are acceptable and/or required.
174
- */
175
- deviceId?: ConstrainDOMString;
176
- /**
177
- * A ConstrainDouble specifying the frame rate or range of frame rates which are acceptable and/or required.
178
- */
179
- frameRate?: ConstrainDouble;
180
- /**
181
- * a facing or an array of facings which are acceptable and/or required.
182
- */
183
- facingMode?: 'user' | 'environment' | 'left' | 'right';
184
- resolution?: VideoResolution;
185
- /**
186
- * initialize the track with a given processor
187
- */
188
- processor?: TrackProcessor<Track.Kind.Video, VideoProcessorOptions>;
189
- }
190
- export interface ScreenShareCaptureOptions {
191
- /**
192
- * true to capture audio shared. browser support for audio capturing in
193
- * screenshare is limited: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia#browser_compatibility
194
- */
195
- audio?: boolean | AudioCaptureOptions;
196
- /**
197
- * only allows for 'true' and chrome allows for additional options to be passed in
198
- * https://developer.chrome.com/docs/web-platform/screen-sharing-controls/#displaySurface
199
- */
200
- video?: true | {
201
- displaySurface?: 'window' | 'browser' | 'monitor';
202
- };
203
- /**
204
- * capture resolution, defaults to 1080 for all browsers other than Safari
205
- * On Safari 17, default resolution is not capped, due to a bug, specifying
206
- * any resolution at all would lead to a low-resolution capture.
207
- * https://bugs.webkit.org/show_bug.cgi?id=263015
208
- */
209
- resolution?: VideoResolution;
210
- /** a CaptureController object instance containing methods that can be used to further manipulate the capture session if included. */
211
- controller?: unknown;
212
- /** specifies whether the browser should allow the user to select the current tab for capture */
213
- selfBrowserSurface?: 'include' | 'exclude';
214
- /** specifies whether the browser should display a control to allow the user to dynamically switch the shared tab during screen-sharing. */
215
- surfaceSwitching?: 'include' | 'exclude';
216
- /** specifies whether the browser should include the system audio among the possible audio sources offered to the user */
217
- systemAudio?: 'include' | 'exclude';
218
- /** specify the type of content, see: https://www.w3.org/TR/mst-content-hint/#video-content-hints */
219
- contentHint?: 'detail' | 'text' | 'motion';
220
- /**
221
- * Experimental option to control whether the audio playing in a tab will continue to be played out of a user's
222
- * local speakers when the tab is captured.
223
- */
224
- suppressLocalAudioPlayback?: boolean;
225
- /**
226
- * Experimental option to instruct the browser to offer the current tab as the most prominent capture source
227
- * @experimental
228
- * @see https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia#prefercurrenttab
229
- */
230
- preferCurrentTab?: boolean;
231
- }
232
- export interface AudioCaptureOptions {
233
- /**
234
- * specifies whether automatic gain control is preferred and/or required
235
- */
236
- autoGainControl?: ConstrainBoolean;
237
- /**
238
- * the channel count or range of channel counts which are acceptable and/or required
239
- */
240
- channelCount?: ConstrainULong;
241
- /**
242
- * A ConstrainDOMString object specifying a device ID or an array of device
243
- * IDs which are acceptable and/or required.
244
- */
245
- deviceId?: ConstrainDOMString;
246
- /**
247
- * whether or not echo cancellation is preferred and/or required
248
- */
249
- echoCancellation?: ConstrainBoolean;
250
- /**
251
- * the latency or range of latencies which are acceptable and/or required.
252
- */
253
- latency?: ConstrainDouble;
254
- /**
255
- * whether noise suppression is preferred and/or required.
256
- */
257
- noiseSuppression?: ConstrainBoolean;
258
- /**
259
- * @experimental
260
- * a stronger version of 'noiseSuppression', browser support is not widespread yet.
261
- * If this is set (and supported) the value for 'noiseSuppression' will be ignored
262
- * @see https://w3c.github.io/mediacapture-extensions/#voiceisolation-constraint
263
- */
264
- voiceIsolation?: ConstrainBoolean;
265
- /**
266
- * @experimental
267
- * when capturing system/screen-share audio, excludes the local participant's own audio
268
- * from the captured stream to prevent echo. Browser support is not widespread yet
269
- * (as of mid 2026, Chromium-based browsers only).
270
- * @see https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/restrictOwnAudio
271
- */
272
- restrictOwnAudio?: ConstrainBoolean;
273
- /**
274
- * the sample rate or range of sample rates which are acceptable and/or required.
275
- */
276
- sampleRate?: ConstrainULong;
277
- /**
278
- * sample size or range of sample sizes which are acceptable and/or required.
279
- */
280
- sampleSize?: ConstrainULong;
281
- /**
282
- * initialize the track with a given processor
283
- */
284
- processor?: TrackProcessor<Track.Kind.Audio, AudioProcessorOptions>;
285
- }
286
- export interface AudioOutputOptions {
287
- /**
288
- * deviceId to output audio
289
- *
290
- * Only supported on browsers where `setSinkId` is available
291
- */
292
- deviceId?: string;
293
- }
294
- export interface VideoResolution {
295
- width: number;
296
- height: number;
297
- frameRate?: number;
298
- aspectRatio?: number;
299
- }
300
- export interface VideoEncoding {
301
- maxBitrate: number;
302
- maxFramerate?: number;
303
- priority?: RTCPriorityType;
304
- }
305
- export interface VideoPresetOptions {
306
- width: number;
307
- height: number;
308
- aspectRatio?: number;
309
- maxBitrate: number;
310
- maxFramerate?: number;
311
- priority?: RTCPriorityType;
312
- }
313
- export declare class VideoPreset {
314
- encoding: VideoEncoding;
315
- width: number;
316
- height: number;
317
- aspectRatio?: number;
318
- constructor(videoPresetOptions: VideoPresetOptions);
319
- constructor(width: number, height: number, maxBitrate: number, maxFramerate?: number, priority?: RTCPriorityType);
320
- get resolution(): VideoResolution;
321
- }
322
- export interface AudioPreset {
323
- maxBitrate: number;
324
- priority?: RTCPriorityType;
325
- }
326
- export declare const audioCodecs: readonly [
327
- "opus",
328
- "red"
329
- ];
330
- export type AudioCodec = (typeof audioCodecs)[number];
331
- declare const backupVideoCodecs: readonly [
332
- "vp8",
333
- "h264"
334
- ];
335
- export declare const videoCodecs: readonly [
336
- "vp8",
337
- "h264",
338
- "vp9",
339
- "av1",
340
- "h265"
341
- ];
342
- export type VideoCodec = (typeof videoCodecs)[number];
343
- export type BackupVideoCodec = (typeof backupVideoCodecs)[number];
344
- export declare function isBackupVideoCodec(codec: string): codec is BackupVideoCodec;
345
- /** @deprecated Use {@link isBackupVideoCodec} instead */
346
- export declare const isBackupCodec: typeof isBackupVideoCodec;
347
- export declare enum BackupCodecPolicy {
348
- PREFER_REGRESSION = 0,
349
- SIMULCAST = 1,
350
- REGRESSION = 2
351
- }
352
- /**
353
- * scalability modes for svc.
354
- */
355
- export type ScalabilityMode = 'L1T1' | 'L1T2' | 'L1T3' | 'L2T1' | 'L2T1h' | 'L2T1_KEY' | 'L2T2' | 'L2T2h' | 'L2T2_KEY' | 'L2T3' | 'L2T3h' | 'L2T3_KEY' | 'L3T1' | 'L3T1h' | 'L3T1_KEY' | 'L3T2' | 'L3T2h' | 'L3T2_KEY' | 'L3T3' | 'L3T3h' | 'L3T3_KEY';
356
- export declare namespace AudioPresets {
357
- const telephone: AudioPreset;
358
- const speech: AudioPreset;
359
- const music: AudioPreset;
360
- const musicStereo: AudioPreset;
361
- const musicHighQuality: AudioPreset;
362
- const musicHighQualityStereo: AudioPreset;
363
- }
364
- /**
365
- * Sane presets for video resolution/encoding
366
- */
367
- export declare const VideoPresets: {
368
- readonly h90: VideoPreset;
369
- readonly h180: VideoPreset;
370
- readonly h216: VideoPreset;
371
- readonly h360: VideoPreset;
372
- readonly h540: VideoPreset;
373
- readonly h720: VideoPreset;
374
- readonly h1080: VideoPreset;
375
- readonly h1440: VideoPreset;
376
- readonly h2160: VideoPreset;
377
- };
378
- /**
379
- * Four by three presets
380
- */
381
- export declare const VideoPresets43: {
382
- readonly h120: VideoPreset;
383
- readonly h180: VideoPreset;
384
- readonly h240: VideoPreset;
385
- readonly h360: VideoPreset;
386
- readonly h480: VideoPreset;
387
- readonly h540: VideoPreset;
388
- readonly h720: VideoPreset;
389
- readonly h1080: VideoPreset;
390
- readonly h1440: VideoPreset;
391
- };
392
- export declare const ScreenSharePresets: {
393
- readonly h360fps3: VideoPreset;
394
- readonly h360fps15: VideoPreset;
395
- readonly h720fps5: VideoPreset;
396
- readonly h720fps15: VideoPreset;
397
- readonly h720fps30: VideoPreset;
398
- readonly h1080fps15: VideoPreset;
399
- readonly h1080fps30: VideoPreset;
400
- readonly original: VideoPreset;
401
- };
402
- export {};
403
- //# sourceMappingURL=options.d.ts.map
1
+ import type { FrameMetadataPublishOptions } from '../../frameMetadata/types';
2
+ import type { Track } from './Track';
3
+ import type { AudioProcessorOptions, TrackProcessor, VideoProcessorOptions } from './processor/types';
4
+ export interface TrackPublishDefaults {
5
+ /**
6
+ * encoding parameters for camera track
7
+ */
8
+ videoEncoding?: VideoEncoding;
9
+ /**
10
+ * Advanced codecs (VP9/AV1/H265) are not supported by all browser clients. When backupCodec is
11
+ * set, when an incompatible client attempts to subscribe to the track, LiveKit
12
+ * will automatically publish a secondary track encoded with the backup codec.
13
+ *
14
+ * You could customize specific encoding parameters of the backup track by
15
+ * explicitly setting codec and encoding fields.
16
+ *
17
+ * Defaults to `true`
18
+ */
19
+ backupCodec?: true | false | {
20
+ codec: BackupVideoCodec;
21
+ encoding?: VideoEncoding;
22
+ };
23
+ /**
24
+ * When backup codec is enabled, there are two options to decide whether to
25
+ * send the primary codec at the same time:
26
+ * * codec regression: publisher stops sending primary codec and all subscribers
27
+ * will receive backup codec even if the primary codec is supported on their browser. It is the default
28
+ * behavior and provides maximum compatibility. It also reduces CPU
29
+ * and bandwidth consumption for publisher.
30
+ * * multi-codec simulcast: publisher encodes and sends both codecs at same time,
31
+ * subscribers will get most efficient codec. It will provide most bandwidth
32
+ * efficiency, especially in the large 1:N room but requires more device performance
33
+ * and bandwidth consumption for publisher.
34
+ */
35
+ backupCodecPolicy?: BackupCodecPolicy;
36
+ /**
37
+ * encoding parameters for screen share track
38
+ */
39
+ screenShareEncoding?: VideoEncoding;
40
+ /**
41
+ * codec, defaults to vp8; for svc codecs, auto enable vp8
42
+ * as backup. (TBD)
43
+ */
44
+ videoCodec?: VideoCodec;
45
+ /**
46
+ * which audio preset should be used for publishing (audio) tracks
47
+ * defaults to [[AudioPresets.music]]
48
+ */
49
+ audioPreset?: AudioPreset;
50
+ /**
51
+ * dtx (Discontinuous Transmission of audio), enabled by default for mono tracks.
52
+ */
53
+ dtx?: boolean;
54
+ /**
55
+ * red (Redundant Audio Data), enabled by default for mono tracks.
56
+ */
57
+ red?: boolean;
58
+ /**
59
+ * publish track in stereo mode (or set to false to disable). defaults determined by capture channel count.
60
+ */
61
+ forceStereo?: boolean;
62
+ /**
63
+ * use simulcast, defaults to true.
64
+ * When using simulcast, LiveKit will publish up to three versions of the stream
65
+ * at various resolutions.
66
+ */
67
+ simulcast?: boolean;
68
+ /**
69
+ * scalability mode for svc codecs, defaults to 'L3T3_KEY'.
70
+ * for svc codecs, simulcast is disabled if more than one spatial layer is used ('L2Tx' or 'L3Tx').
71
+ */
72
+ scalabilityMode?: ScalabilityMode;
73
+ /**
74
+ * Controls how the encoder trades off between resolution and framerate
75
+ * when bandwidth is constrained.
76
+ *
77
+ * - 'maintain-framerate': Prioritizes framerate, reduces resolution if needed
78
+ * - 'maintain-resolution': Prioritizes resolution, drops frames if needed
79
+ * - 'balanced': Balances between both
80
+ *
81
+ * If not set, the SDK uses defaults based on track source:
82
+ * - Camera: 'maintain-framerate' (smoother video for real-time communication)
83
+ * - Screen share: 'maintain-resolution' (clarity is critical for text/UI)
84
+ * - Other/unknown: 'balanced'
85
+ */
86
+ degradationPreference?: RTCDegradationPreference;
87
+ /**
88
+ * Up to two additional simulcast layers to publish in addition to the original
89
+ * Track.
90
+ * When left blank, it defaults to h180, h360.
91
+ * If a SVC codec is used (VP9 or AV1), this field has no effect.
92
+ *
93
+ * To publish three total layers, you would specify:
94
+ * {
95
+ * videoEncoding: {...}, // encoding of the primary layer
96
+ * videoSimulcastLayers: [
97
+ * VideoPresets.h540,
98
+ * VideoPresets.h216,
99
+ * ],
100
+ * }
101
+ */
102
+ videoSimulcastLayers?: Array<VideoPreset>;
103
+ /**
104
+ * custom video simulcast layers for screen tracks
105
+ * Note: the layers need to be ordered from lowest to highest quality
106
+ */
107
+ screenShareSimulcastLayers?: Array<VideoPreset>;
108
+ /**
109
+ * For local tracks, stop the underlying MediaStreamTrack when the track is muted (or paused)
110
+ * on some platforms, this option is necessary to disable the microphone recording indicator.
111
+ * Note: when this is enabled, and BT devices are connected, they will transition between
112
+ * profiles (e.g. HFP to A2DP) and there will be an audible difference in playback.
113
+ *
114
+ * defaults to false
115
+ */
116
+ stopMicTrackOnMute?: boolean;
117
+ /**
118
+ * Enables preconnect buffer for a user's microphone track.
119
+ * This is useful for reducing perceived latency when the user starts to speak before the connection is established.
120
+ * Only works for agent use cases.
121
+ *
122
+ * Defaults to false.
123
+ */
124
+ preConnectBuffer?: boolean;
125
+ /**
126
+ * Frame metadata to append to published video frames.
127
+ *
128
+ * Requires either room-level frame metadata worker configuration or E2EE,
129
+ * because encoded frame transforms are used to write the metadata.
130
+ *
131
+ * @experimental
132
+ */
133
+ frameMetadata?: FrameMetadataPublishOptions;
134
+ /**
135
+ * @deprecated Use {@link TrackPublishDefaults.frameMetadata} instead.
136
+ */
137
+ packetTrailer?: FrameMetadataPublishOptions;
138
+ }
139
+ /**
140
+ * Options when publishing tracks
141
+ */
142
+ export interface TrackPublishOptions extends TrackPublishDefaults {
143
+ /**
144
+ * set a track name
145
+ */
146
+ name?: string;
147
+ /**
148
+ * Source of track, camera, microphone, or screen
149
+ */
150
+ source?: Track.Source;
151
+ /**
152
+ * Set stream name for the track. Audio and video tracks with the same stream name
153
+ * will be placed in the same `MediaStream` and offer better synchronization.
154
+ * By default, camera and microphone will be placed in a stream; as would screen_share and screen_share_audio
155
+ */
156
+ stream?: string;
157
+ }
158
+ export interface CreateLocalTracksOptions {
159
+ /**
160
+ * audio track options, true to create with defaults. false if audio shouldn't be created
161
+ * default true
162
+ */
163
+ audio?: boolean | AudioCaptureOptions;
164
+ /**
165
+ * video track options, true to create with defaults. false if video shouldn't be created
166
+ * default true
167
+ */
168
+ video?: boolean | VideoCaptureOptions;
169
+ }
170
+ export interface VideoCaptureOptions {
171
+ /**
172
+ * A ConstrainDOMString object specifying a device ID or an array of device
173
+ * IDs which are acceptable and/or required.
174
+ */
175
+ deviceId?: ConstrainDOMString;
176
+ /**
177
+ * A ConstrainDouble specifying the frame rate or range of frame rates which are acceptable and/or required.
178
+ */
179
+ frameRate?: ConstrainDouble;
180
+ /**
181
+ * a facing or an array of facings which are acceptable and/or required.
182
+ */
183
+ facingMode?: 'user' | 'environment' | 'left' | 'right';
184
+ resolution?: VideoResolution;
185
+ /**
186
+ * initialize the track with a given processor
187
+ */
188
+ processor?: TrackProcessor<Track.Kind.Video, VideoProcessorOptions>;
189
+ }
190
+ export interface ScreenShareCaptureOptions {
191
+ /**
192
+ * true to capture audio shared. browser support for audio capturing in
193
+ * screenshare is limited: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia#browser_compatibility
194
+ */
195
+ audio?: boolean | AudioCaptureOptions;
196
+ /**
197
+ * only allows for 'true' and chrome allows for additional options to be passed in
198
+ * https://developer.chrome.com/docs/web-platform/screen-sharing-controls/#displaySurface
199
+ */
200
+ video?: true | {
201
+ displaySurface?: 'window' | 'browser' | 'monitor';
202
+ };
203
+ /**
204
+ * capture resolution, defaults to 1080 for all browsers other than Safari
205
+ * On Safari 17, default resolution is not capped, due to a bug, specifying
206
+ * any resolution at all would lead to a low-resolution capture.
207
+ * https://bugs.webkit.org/show_bug.cgi?id=263015
208
+ */
209
+ resolution?: VideoResolution;
210
+ /** a CaptureController object instance containing methods that can be used to further manipulate the capture session if included. */
211
+ controller?: unknown;
212
+ /** specifies whether the browser should allow the user to select the current tab for capture */
213
+ selfBrowserSurface?: 'include' | 'exclude';
214
+ /** specifies whether the browser should display a control to allow the user to dynamically switch the shared tab during screen-sharing. */
215
+ surfaceSwitching?: 'include' | 'exclude';
216
+ /** specifies whether the browser should include the system audio among the possible audio sources offered to the user */
217
+ systemAudio?: 'include' | 'exclude';
218
+ /** specify the type of content, see: https://www.w3.org/TR/mst-content-hint/#video-content-hints */
219
+ contentHint?: 'detail' | 'text' | 'motion';
220
+ /**
221
+ * Experimental option to control whether the audio playing in a tab will continue to be played out of a user's
222
+ * local speakers when the tab is captured.
223
+ */
224
+ suppressLocalAudioPlayback?: boolean;
225
+ /**
226
+ * Experimental option to instruct the browser to offer the current tab as the most prominent capture source
227
+ * @experimental
228
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getDisplayMedia#prefercurrenttab
229
+ */
230
+ preferCurrentTab?: boolean;
231
+ }
232
+ export interface AudioCaptureOptions {
233
+ /**
234
+ * specifies whether automatic gain control is preferred and/or required
235
+ */
236
+ autoGainControl?: ConstrainBoolean;
237
+ /**
238
+ * the channel count or range of channel counts which are acceptable and/or required
239
+ */
240
+ channelCount?: ConstrainULong;
241
+ /**
242
+ * A ConstrainDOMString object specifying a device ID or an array of device
243
+ * IDs which are acceptable and/or required.
244
+ */
245
+ deviceId?: ConstrainDOMString;
246
+ /**
247
+ * whether or not echo cancellation is preferred and/or required
248
+ */
249
+ echoCancellation?: ConstrainBoolean;
250
+ /**
251
+ * the latency or range of latencies which are acceptable and/or required.
252
+ */
253
+ latency?: ConstrainDouble;
254
+ /**
255
+ * whether noise suppression is preferred and/or required.
256
+ */
257
+ noiseSuppression?: ConstrainBoolean;
258
+ /**
259
+ * @experimental
260
+ * a stronger version of 'noiseSuppression', browser support is not widespread yet.
261
+ * If this is set (and supported) the value for 'noiseSuppression' will be ignored
262
+ * @see https://w3c.github.io/mediacapture-extensions/#voiceisolation-constraint
263
+ */
264
+ voiceIsolation?: ConstrainBoolean;
265
+ /**
266
+ * @experimental
267
+ * when capturing system/screen-share audio, excludes the local participant's own audio
268
+ * from the captured stream to prevent echo. Browser support is not widespread yet
269
+ * (as of mid 2026, Chromium-based browsers only).
270
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/MediaTrackConstraints/restrictOwnAudio
271
+ */
272
+ restrictOwnAudio?: ConstrainBoolean;
273
+ /**
274
+ * the sample rate or range of sample rates which are acceptable and/or required.
275
+ */
276
+ sampleRate?: ConstrainULong;
277
+ /**
278
+ * sample size or range of sample sizes which are acceptable and/or required.
279
+ */
280
+ sampleSize?: ConstrainULong;
281
+ /**
282
+ * initialize the track with a given processor
283
+ */
284
+ processor?: TrackProcessor<Track.Kind.Audio, AudioProcessorOptions>;
285
+ }
286
+ export interface AudioOutputOptions {
287
+ /**
288
+ * deviceId to output audio
289
+ *
290
+ * Only supported on browsers where `setSinkId` is available
291
+ */
292
+ deviceId?: string;
293
+ }
294
+ export interface VideoResolution {
295
+ width: number;
296
+ height: number;
297
+ frameRate?: number;
298
+ aspectRatio?: number;
299
+ }
300
+ export interface VideoEncoding {
301
+ maxBitrate: number;
302
+ maxFramerate?: number;
303
+ priority?: RTCPriorityType;
304
+ }
305
+ export interface VideoPresetOptions {
306
+ width: number;
307
+ height: number;
308
+ aspectRatio?: number;
309
+ maxBitrate: number;
310
+ maxFramerate?: number;
311
+ priority?: RTCPriorityType;
312
+ }
313
+ export declare class VideoPreset {
314
+ encoding: VideoEncoding;
315
+ width: number;
316
+ height: number;
317
+ aspectRatio?: number;
318
+ constructor(videoPresetOptions: VideoPresetOptions);
319
+ constructor(width: number, height: number, maxBitrate: number, maxFramerate?: number, priority?: RTCPriorityType);
320
+ get resolution(): VideoResolution;
321
+ }
322
+ export interface AudioPreset {
323
+ maxBitrate: number;
324
+ priority?: RTCPriorityType;
325
+ }
326
+ export declare const audioCodecs: readonly [
327
+ "opus",
328
+ "red"
329
+ ];
330
+ export type AudioCodec = (typeof audioCodecs)[number];
331
+ declare const backupVideoCodecs: readonly [
332
+ "vp8",
333
+ "h264"
334
+ ];
335
+ export declare const videoCodecs: readonly [
336
+ "vp8",
337
+ "h264",
338
+ "vp9",
339
+ "av1",
340
+ "h265"
341
+ ];
342
+ export type VideoCodec = (typeof videoCodecs)[number];
343
+ export type BackupVideoCodec = (typeof backupVideoCodecs)[number];
344
+ export declare function isBackupVideoCodec(codec: string): codec is BackupVideoCodec;
345
+ /** @deprecated Use {@link isBackupVideoCodec} instead */
346
+ export declare const isBackupCodec: typeof isBackupVideoCodec;
347
+ export declare enum BackupCodecPolicy {
348
+ PREFER_REGRESSION = 0,
349
+ SIMULCAST = 1,
350
+ REGRESSION = 2
351
+ }
352
+ /**
353
+ * scalability modes for svc.
354
+ */
355
+ export type ScalabilityMode = 'L1T1' | 'L1T2' | 'L1T3' | 'L2T1' | 'L2T1h' | 'L2T1_KEY' | 'L2T2' | 'L2T2h' | 'L2T2_KEY' | 'L2T3' | 'L2T3h' | 'L2T3_KEY' | 'L3T1' | 'L3T1h' | 'L3T1_KEY' | 'L3T2' | 'L3T2h' | 'L3T2_KEY' | 'L3T3' | 'L3T3h' | 'L3T3_KEY';
356
+ export declare namespace AudioPresets {
357
+ const telephone: AudioPreset;
358
+ const speech: AudioPreset;
359
+ const music: AudioPreset;
360
+ const musicStereo: AudioPreset;
361
+ const musicHighQuality: AudioPreset;
362
+ const musicHighQualityStereo: AudioPreset;
363
+ }
364
+ /**
365
+ * Sane presets for video resolution/encoding
366
+ */
367
+ export declare const VideoPresets: {
368
+ readonly h90: VideoPreset;
369
+ readonly h180: VideoPreset;
370
+ readonly h216: VideoPreset;
371
+ readonly h360: VideoPreset;
372
+ readonly h540: VideoPreset;
373
+ readonly h720: VideoPreset;
374
+ readonly h1080: VideoPreset;
375
+ readonly h1440: VideoPreset;
376
+ readonly h2160: VideoPreset;
377
+ };
378
+ /**
379
+ * Four by three presets
380
+ */
381
+ export declare const VideoPresets43: {
382
+ readonly h120: VideoPreset;
383
+ readonly h180: VideoPreset;
384
+ readonly h240: VideoPreset;
385
+ readonly h360: VideoPreset;
386
+ readonly h480: VideoPreset;
387
+ readonly h540: VideoPreset;
388
+ readonly h720: VideoPreset;
389
+ readonly h1080: VideoPreset;
390
+ readonly h1440: VideoPreset;
391
+ };
392
+ export declare const ScreenSharePresets: {
393
+ readonly h360fps3: VideoPreset;
394
+ readonly h360fps15: VideoPreset;
395
+ readonly h720fps5: VideoPreset;
396
+ readonly h720fps15: VideoPreset;
397
+ readonly h720fps30: VideoPreset;
398
+ readonly h1080fps15: VideoPreset;
399
+ readonly h1080fps30: VideoPreset;
400
+ readonly original: VideoPreset;
401
+ };
402
+ export {};
403
+ //# sourceMappingURL=options.d.ts.map