livekit-client 0.18.4-RC8 → 0.18.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 (126) hide show
  1. package/README.md +2 -5
  2. package/dist/api/RequestQueue.d.ts +13 -12
  3. package/dist/api/RequestQueue.d.ts.map +1 -0
  4. package/dist/api/SignalClient.d.ts +67 -66
  5. package/dist/api/SignalClient.d.ts.map +1 -0
  6. package/dist/connect.d.ts +24 -23
  7. package/dist/connect.d.ts.map +1 -0
  8. package/dist/index.d.ts +27 -26
  9. package/dist/index.d.ts.map +1 -0
  10. package/dist/livekit-client.esm.mjs +459 -459
  11. package/dist/livekit-client.esm.mjs.map +1 -1
  12. package/dist/livekit-client.umd.js.map +1 -1
  13. package/dist/logger.d.ts +26 -25
  14. package/dist/logger.d.ts.map +1 -0
  15. package/dist/options.d.ts +128 -127
  16. package/dist/options.d.ts.map +1 -0
  17. package/dist/proto/google/protobuf/timestamp.d.ts +133 -132
  18. package/dist/proto/google/protobuf/timestamp.d.ts.map +1 -0
  19. package/dist/proto/livekit_models.d.ts +876 -875
  20. package/dist/proto/livekit_models.d.ts.map +1 -0
  21. package/dist/proto/livekit_rtc.d.ts +3904 -3903
  22. package/dist/proto/livekit_rtc.d.ts.map +1 -0
  23. package/dist/room/DeviceManager.d.ts +8 -7
  24. package/dist/room/DeviceManager.d.ts.map +1 -0
  25. package/dist/room/PCTransport.d.ts +16 -15
  26. package/dist/room/PCTransport.d.ts.map +1 -0
  27. package/dist/room/RTCEngine.d.ts +67 -66
  28. package/dist/room/RTCEngine.d.ts.map +1 -0
  29. package/dist/room/Room.d.ts +166 -165
  30. package/dist/room/Room.d.ts.map +1 -0
  31. package/dist/room/errors.d.ts +29 -28
  32. package/dist/room/errors.d.ts.map +1 -0
  33. package/dist/room/events.d.ts +391 -390
  34. package/dist/room/events.d.ts.map +1 -0
  35. package/dist/room/participant/LocalParticipant.d.ts +126 -125
  36. package/dist/room/participant/LocalParticipant.d.ts.map +1 -0
  37. package/dist/room/participant/Participant.d.ts +94 -93
  38. package/dist/room/participant/Participant.d.ts.map +1 -0
  39. package/dist/room/participant/ParticipantTrackPermission.d.ts +26 -25
  40. package/dist/room/participant/ParticipantTrackPermission.d.ts.map +1 -0
  41. package/dist/room/participant/RemoteParticipant.d.ts +40 -39
  42. package/dist/room/participant/RemoteParticipant.d.ts.map +1 -0
  43. package/dist/room/participant/publishUtils.d.ts +18 -17
  44. package/dist/room/participant/publishUtils.d.ts.map +1 -0
  45. package/dist/room/stats.d.ts +66 -65
  46. package/dist/room/stats.d.ts.map +1 -0
  47. package/dist/room/track/LocalAudioTrack.d.ts +20 -19
  48. package/dist/room/track/LocalAudioTrack.d.ts.map +1 -0
  49. package/dist/room/track/LocalTrack.d.ts +28 -27
  50. package/dist/room/track/LocalTrack.d.ts.map +1 -0
  51. package/dist/room/track/LocalTrackPublication.d.ts +38 -37
  52. package/dist/room/track/LocalTrackPublication.d.ts.map +1 -0
  53. package/dist/room/track/LocalVideoTrack.d.ts +31 -30
  54. package/dist/room/track/LocalVideoTrack.d.ts.map +1 -0
  55. package/dist/room/track/RemoteAudioTrack.d.ts +20 -19
  56. package/dist/room/track/RemoteAudioTrack.d.ts.map +1 -0
  57. package/dist/room/track/RemoteTrack.d.ts +16 -15
  58. package/dist/room/track/RemoteTrack.d.ts.map +1 -0
  59. package/dist/room/track/RemoteTrackPublication.d.ts +51 -50
  60. package/dist/room/track/RemoteTrackPublication.d.ts.map +1 -0
  61. package/dist/room/track/RemoteVideoTrack.d.ts +28 -27
  62. package/dist/room/track/RemoteVideoTrack.d.ts.map +1 -0
  63. package/dist/room/track/Track.d.ts +101 -100
  64. package/dist/room/track/Track.d.ts.map +1 -0
  65. package/dist/room/track/TrackPublication.d.ts +50 -49
  66. package/dist/room/track/TrackPublication.d.ts.map +1 -0
  67. package/dist/room/track/create.d.ts +24 -23
  68. package/dist/room/track/create.d.ts.map +1 -0
  69. package/dist/room/track/defaults.d.ts +5 -4
  70. package/dist/room/track/defaults.d.ts.map +1 -0
  71. package/dist/room/track/options.d.ts +223 -222
  72. package/dist/room/track/options.d.ts.map +1 -0
  73. package/dist/room/track/types.d.ts +19 -18
  74. package/dist/room/track/types.d.ts.map +1 -0
  75. package/dist/room/track/utils.d.ts +14 -13
  76. package/dist/room/track/utils.d.ts.map +1 -0
  77. package/dist/room/utils.d.ts +17 -16
  78. package/dist/room/utils.d.ts.map +1 -0
  79. package/dist/test/mocks.d.ts +12 -11
  80. package/dist/test/mocks.d.ts.map +1 -0
  81. package/dist/version.d.ts +3 -2
  82. package/dist/version.d.ts.map +1 -0
  83. package/package.json +4 -4
  84. package/src/api/RequestQueue.ts +53 -0
  85. package/src/api/SignalClient.ts +497 -0
  86. package/src/connect.ts +98 -0
  87. package/src/index.ts +49 -0
  88. package/src/logger.ts +56 -0
  89. package/src/options.ts +156 -0
  90. package/src/proto/google/protobuf/timestamp.ts +216 -0
  91. package/src/proto/livekit_models.ts +2456 -0
  92. package/src/proto/livekit_rtc.ts +2859 -0
  93. package/src/room/DeviceManager.ts +80 -0
  94. package/src/room/PCTransport.ts +88 -0
  95. package/src/room/RTCEngine.ts +695 -0
  96. package/src/room/Room.ts +970 -0
  97. package/src/room/errors.ts +65 -0
  98. package/src/room/events.ts +438 -0
  99. package/src/room/participant/LocalParticipant.ts +755 -0
  100. package/src/room/participant/Participant.ts +287 -0
  101. package/src/room/participant/ParticipantTrackPermission.ts +42 -0
  102. package/src/room/participant/RemoteParticipant.ts +263 -0
  103. package/src/room/participant/publishUtils.test.ts +144 -0
  104. package/src/room/participant/publishUtils.ts +229 -0
  105. package/src/room/stats.ts +134 -0
  106. package/src/room/track/LocalAudioTrack.ts +134 -0
  107. package/src/room/track/LocalTrack.ts +229 -0
  108. package/src/room/track/LocalTrackPublication.ts +87 -0
  109. package/src/room/track/LocalVideoTrack.test.ts +72 -0
  110. package/src/room/track/LocalVideoTrack.ts +295 -0
  111. package/src/room/track/RemoteAudioTrack.ts +86 -0
  112. package/src/room/track/RemoteTrack.ts +62 -0
  113. package/src/room/track/RemoteTrackPublication.ts +207 -0
  114. package/src/room/track/RemoteVideoTrack.ts +240 -0
  115. package/src/room/track/Track.ts +358 -0
  116. package/src/room/track/TrackPublication.ts +120 -0
  117. package/src/room/track/create.ts +122 -0
  118. package/src/room/track/defaults.ts +27 -0
  119. package/src/room/track/options.ts +281 -0
  120. package/src/room/track/types.ts +20 -0
  121. package/src/room/track/utils.test.ts +110 -0
  122. package/src/room/track/utils.ts +113 -0
  123. package/src/room/utils.ts +115 -0
  124. package/src/test/mocks.ts +17 -0
  125. package/src/version.ts +2 -0
  126. package/CHANGELOG.md +0 -5
@@ -325,9 +325,9 @@ livekitLogger.setLevel(LogLevel.info);
325
325
  function setLogLevel(level) {
326
326
  livekitLogger.setLevel(level);
327
327
  }
328
- /**
329
- * use this to hook into the logging function to allow sending internal livekit logs to third party services
330
- * if set, the browser logs will lose their stacktrace information (see https://github.com/pimterry/loglevel#writing-plugins)
328
+ /**
329
+ * use this to hook into the logging function to allow sending internal livekit logs to third party services
330
+ * if set, the browser logs will lose their stacktrace information (see https://github.com/pimterry/loglevel#writing-plugins)
331
331
  */
332
332
 
333
333
  function setLogExtension(extension) {
@@ -9229,237 +9229,237 @@ var MediaDeviceFailure;
9229
9229
  MediaDeviceFailure.getFailure = getFailure;
9230
9230
  })(MediaDeviceFailure || (MediaDeviceFailure = {}));
9231
9231
 
9232
- /**
9233
- * Events are the primary way LiveKit notifies your application of changes.
9234
- *
9235
- * The following are events emitted by [[Room]], listen to room events like
9236
- *
9237
- * ```typescript
9238
- * room.on(RoomEvent.TrackPublished, (track, publication, participant) => {})
9239
- * ```
9232
+ /**
9233
+ * Events are the primary way LiveKit notifies your application of changes.
9234
+ *
9235
+ * The following are events emitted by [[Room]], listen to room events like
9236
+ *
9237
+ * ```typescript
9238
+ * room.on(RoomEvent.TrackPublished, (track, publication, participant) => {})
9239
+ * ```
9240
9240
  */
9241
9241
  var RoomEvent;
9242
9242
 
9243
9243
  (function (RoomEvent) {
9244
- /**
9245
- * When the connection to the server has been interrupted and it's attempting
9246
- * to reconnect.
9244
+ /**
9245
+ * When the connection to the server has been interrupted and it's attempting
9246
+ * to reconnect.
9247
9247
  */
9248
9248
  RoomEvent["Reconnecting"] = "reconnecting";
9249
- /**
9250
- * Fires when a reconnection has been successful.
9249
+ /**
9250
+ * Fires when a reconnection has been successful.
9251
9251
  */
9252
9252
 
9253
9253
  RoomEvent["Reconnected"] = "reconnected";
9254
- /**
9255
- * When disconnected from room. This fires when room.disconnect() is called or
9256
- * when an unrecoverable connection issue had occured
9254
+ /**
9255
+ * When disconnected from room. This fires when room.disconnect() is called or
9256
+ * when an unrecoverable connection issue had occured
9257
9257
  */
9258
9258
 
9259
9259
  RoomEvent["Disconnected"] = "disconnected";
9260
- /**
9261
- * Whenever the connection state of the room changes
9262
- *
9263
- * args: ([[RoomState]])
9260
+ /**
9261
+ * Whenever the connection state of the room changes
9262
+ *
9263
+ * args: ([[RoomState]])
9264
9264
  */
9265
9265
 
9266
9266
  RoomEvent["StateChanged"] = "stateChanged";
9267
- /**
9268
- * When input or output devices on the machine have changed.
9267
+ /**
9268
+ * When input or output devices on the machine have changed.
9269
9269
  */
9270
9270
 
9271
9271
  RoomEvent["MediaDevicesChanged"] = "mediaDevicesChanged";
9272
- /**
9273
- * When a [[RemoteParticipant]] joins *after* the local
9274
- * participant. It will not emit events for participants that are already
9275
- * in the room
9276
- *
9277
- * args: ([[RemoteParticipant]])
9272
+ /**
9273
+ * When a [[RemoteParticipant]] joins *after* the local
9274
+ * participant. It will not emit events for participants that are already
9275
+ * in the room
9276
+ *
9277
+ * args: ([[RemoteParticipant]])
9278
9278
  */
9279
9279
 
9280
9280
  RoomEvent["ParticipantConnected"] = "participantConnected";
9281
- /**
9282
- * When a [[RemoteParticipant]] leaves *after* the local
9283
- * participant has joined.
9284
- *
9285
- * args: ([[RemoteParticipant]])
9281
+ /**
9282
+ * When a [[RemoteParticipant]] leaves *after* the local
9283
+ * participant has joined.
9284
+ *
9285
+ * args: ([[RemoteParticipant]])
9286
9286
  */
9287
9287
 
9288
9288
  RoomEvent["ParticipantDisconnected"] = "participantDisconnected";
9289
- /**
9290
- * When a new track is published to room *after* the local
9291
- * participant has joined. It will not fire for tracks that are already published.
9292
- *
9293
- * A track published doesn't mean the participant has subscribed to it. It's
9294
- * simply reflecting the state of the room.
9295
- *
9296
- * args: ([[RemoteTrackPublication]], [[RemoteParticipant]])
9289
+ /**
9290
+ * When a new track is published to room *after* the local
9291
+ * participant has joined. It will not fire for tracks that are already published.
9292
+ *
9293
+ * A track published doesn't mean the participant has subscribed to it. It's
9294
+ * simply reflecting the state of the room.
9295
+ *
9296
+ * args: ([[RemoteTrackPublication]], [[RemoteParticipant]])
9297
9297
  */
9298
9298
 
9299
9299
  RoomEvent["TrackPublished"] = "trackPublished";
9300
- /**
9301
- * The [[LocalParticipant]] has subscribed to a new track. This event will **always**
9302
- * fire as long as new tracks are ready for use.
9303
- *
9304
- * args: ([[RemoteTrack]], [[RemoteTrackPublication]], [[RemoteParticipant]])
9300
+ /**
9301
+ * The [[LocalParticipant]] has subscribed to a new track. This event will **always**
9302
+ * fire as long as new tracks are ready for use.
9303
+ *
9304
+ * args: ([[RemoteTrack]], [[RemoteTrackPublication]], [[RemoteParticipant]])
9305
9305
  */
9306
9306
 
9307
9307
  RoomEvent["TrackSubscribed"] = "trackSubscribed";
9308
- /**
9309
- * Could not subscribe to a track
9310
- *
9311
- * args: (track sid, [[RemoteParticipant]])
9308
+ /**
9309
+ * Could not subscribe to a track
9310
+ *
9311
+ * args: (track sid, [[RemoteParticipant]])
9312
9312
  */
9313
9313
 
9314
9314
  RoomEvent["TrackSubscriptionFailed"] = "trackSubscriptionFailed";
9315
- /**
9316
- * A [[RemoteParticipant]] has unpublished a track
9317
- *
9318
- * args: ([[RemoteTrackPublication]], [[RemoteParticipant]])
9315
+ /**
9316
+ * A [[RemoteParticipant]] has unpublished a track
9317
+ *
9318
+ * args: ([[RemoteTrackPublication]], [[RemoteParticipant]])
9319
9319
  */
9320
9320
 
9321
9321
  RoomEvent["TrackUnpublished"] = "trackUnpublished";
9322
- /**
9323
- * A subscribed track is no longer available. Clients should listen to this
9324
- * event and ensure they detach tracks.
9325
- *
9326
- * args: ([[Track]], [[RemoteTrackPublication]], [[RemoteParticipant]])
9322
+ /**
9323
+ * A subscribed track is no longer available. Clients should listen to this
9324
+ * event and ensure they detach tracks.
9325
+ *
9326
+ * args: ([[Track]], [[RemoteTrackPublication]], [[RemoteParticipant]])
9327
9327
  */
9328
9328
 
9329
9329
  RoomEvent["TrackUnsubscribed"] = "trackUnsubscribed";
9330
- /**
9331
- * A track that was muted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
9332
- *
9333
- * args: ([[TrackPublication]], [[Participant]])
9330
+ /**
9331
+ * A track that was muted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
9332
+ *
9333
+ * args: ([[TrackPublication]], [[Participant]])
9334
9334
  */
9335
9335
 
9336
9336
  RoomEvent["TrackMuted"] = "trackMuted";
9337
- /**
9338
- * A track that was unmuted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
9339
- *
9340
- * args: ([[TrackPublication]], [[Participant]])
9337
+ /**
9338
+ * A track that was unmuted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
9339
+ *
9340
+ * args: ([[TrackPublication]], [[Participant]])
9341
9341
  */
9342
9342
 
9343
9343
  RoomEvent["TrackUnmuted"] = "trackUnmuted";
9344
- /**
9345
- * A local track was published successfully. This event is helpful to know
9346
- * when to update your local UI with the newly published track.
9347
- *
9348
- * args: ([[LocalTrackPublication]], [[LocalParticipant]])
9344
+ /**
9345
+ * A local track was published successfully. This event is helpful to know
9346
+ * when to update your local UI with the newly published track.
9347
+ *
9348
+ * args: ([[LocalTrackPublication]], [[LocalParticipant]])
9349
9349
  */
9350
9350
 
9351
9351
  RoomEvent["LocalTrackPublished"] = "localTrackPublished";
9352
- /**
9353
- * A local track was unpublished. This event is helpful to know when to remove
9354
- * the local track from your UI.
9355
- *
9356
- * When a user stops sharing their screen by pressing "End" on the browser UI,
9357
- * this event will also fire.
9358
- *
9359
- * args: ([[LocalTrackPublication]], [[LocalParticipant]])
9352
+ /**
9353
+ * A local track was unpublished. This event is helpful to know when to remove
9354
+ * the local track from your UI.
9355
+ *
9356
+ * When a user stops sharing their screen by pressing "End" on the browser UI,
9357
+ * this event will also fire.
9358
+ *
9359
+ * args: ([[LocalTrackPublication]], [[LocalParticipant]])
9360
9360
  */
9361
9361
 
9362
9362
  RoomEvent["LocalTrackUnpublished"] = "localTrackUnpublished";
9363
- /**
9364
- * Active speakers changed. List of speakers are ordered by their audio level.
9365
- * loudest speakers first. This will include the LocalParticipant too.
9366
- *
9367
- * Speaker updates are sent only to the publishing participant and their subscribers.
9368
- *
9369
- * args: (Array<[[Participant]]>)
9363
+ /**
9364
+ * Active speakers changed. List of speakers are ordered by their audio level.
9365
+ * loudest speakers first. This will include the LocalParticipant too.
9366
+ *
9367
+ * Speaker updates are sent only to the publishing participant and their subscribers.
9368
+ *
9369
+ * args: (Array<[[Participant]]>)
9370
9370
  */
9371
9371
 
9372
9372
  RoomEvent["ActiveSpeakersChanged"] = "activeSpeakersChanged";
9373
- /**
9374
- * @deprecated Use ParticipantMetadataChanged instead
9375
- * @internal
9373
+ /**
9374
+ * @deprecated Use ParticipantMetadataChanged instead
9375
+ * @internal
9376
9376
  */
9377
9377
 
9378
9378
  RoomEvent["MetadataChanged"] = "metadataChanged";
9379
- /**
9380
- * Participant metadata is a simple way for app-specific state to be pushed to
9381
- * all users.
9382
- * When RoomService.UpdateParticipantMetadata is called to change a participant's
9383
- * state, *all* participants in the room will fire this event.
9384
- *
9385
- * args: (prevMetadata: string, [[Participant]])
9386
- *
9379
+ /**
9380
+ * Participant metadata is a simple way for app-specific state to be pushed to
9381
+ * all users.
9382
+ * When RoomService.UpdateParticipantMetadata is called to change a participant's
9383
+ * state, *all* participants in the room will fire this event.
9384
+ *
9385
+ * args: (prevMetadata: string, [[Participant]])
9386
+ *
9387
9387
  */
9388
9388
 
9389
9389
  RoomEvent["ParticipantMetadataChanged"] = "participantMetadataChanged";
9390
- /**
9391
- * Room metadata is a simple way for app-specific state to be pushed to
9392
- * all users.
9393
- * When RoomService.UpdateRoomMetadata is called to change a room's state,
9394
- * *all* participants in the room will fire this event.
9395
- *
9396
- * args: (string)
9390
+ /**
9391
+ * Room metadata is a simple way for app-specific state to be pushed to
9392
+ * all users.
9393
+ * When RoomService.UpdateRoomMetadata is called to change a room's state,
9394
+ * *all* participants in the room will fire this event.
9395
+ *
9396
+ * args: (string)
9397
9397
  */
9398
9398
 
9399
9399
  RoomEvent["RoomMetadataChanged"] = "roomMetadataChanged";
9400
- /**
9401
- * Data received from another participant.
9402
- * Data packets provides the ability to use LiveKit to send/receive arbitrary payloads.
9403
- * All participants in the room will receive the messages sent to the room.
9404
- *
9405
- * args: (payload: Uint8Array, participant: [[Participant]], kind: [[DataPacket_Kind]])
9400
+ /**
9401
+ * Data received from another participant.
9402
+ * Data packets provides the ability to use LiveKit to send/receive arbitrary payloads.
9403
+ * All participants in the room will receive the messages sent to the room.
9404
+ *
9405
+ * args: (payload: Uint8Array, participant: [[Participant]], kind: [[DataPacket_Kind]])
9406
9406
  */
9407
9407
 
9408
9408
  RoomEvent["DataReceived"] = "dataReceived";
9409
- /**
9410
- * Connection quality was changed for a Participant. It'll receive updates
9411
- * from the local participant, as well as any [[RemoteParticipant]]s that we are
9412
- * subscribed to.
9413
- *
9414
- * args: (connectionQuality: [[ConnectionQuality]], participant: [[Participant]])
9409
+ /**
9410
+ * Connection quality was changed for a Participant. It'll receive updates
9411
+ * from the local participant, as well as any [[RemoteParticipant]]s that we are
9412
+ * subscribed to.
9413
+ *
9414
+ * args: (connectionQuality: [[ConnectionQuality]], participant: [[Participant]])
9415
9415
  */
9416
9416
 
9417
9417
  RoomEvent["ConnectionQualityChanged"] = "connectionQualityChanged";
9418
- /**
9419
- * StreamState indicates if a subscribed (remote) track has been paused by the SFU
9420
- * (typically this happens because of subscriber's bandwidth constraints)
9421
- *
9422
- * When bandwidth conditions allow, the track will be resumed automatically.
9423
- * TrackStreamStateChanged will also be emitted when that happens.
9424
- *
9425
- * args: (pub: [[RemoteTrackPublication]], streamState: [[Track.StreamState]],
9426
- * participant: [[RemoteParticipant]])
9418
+ /**
9419
+ * StreamState indicates if a subscribed (remote) track has been paused by the SFU
9420
+ * (typically this happens because of subscriber's bandwidth constraints)
9421
+ *
9422
+ * When bandwidth conditions allow, the track will be resumed automatically.
9423
+ * TrackStreamStateChanged will also be emitted when that happens.
9424
+ *
9425
+ * args: (pub: [[RemoteTrackPublication]], streamState: [[Track.StreamState]],
9426
+ * participant: [[RemoteParticipant]])
9427
9427
  */
9428
9428
 
9429
9429
  RoomEvent["TrackStreamStateChanged"] = "trackStreamStateChanged";
9430
- /**
9431
- * One of subscribed tracks have changed its permissions for the current
9432
- * participant. If permission was revoked, then the track will no longer
9433
- * be subscribed. If permission was granted, a TrackSubscribed event will
9434
- * be emitted.
9435
- *
9436
- * args: (pub: [[RemoteTrackPublication]],
9437
- * status: [[TrackPublication.SubscriptionStatus]],
9438
- * participant: [[RemoteParticipant]])
9430
+ /**
9431
+ * One of subscribed tracks have changed its permissions for the current
9432
+ * participant. If permission was revoked, then the track will no longer
9433
+ * be subscribed. If permission was granted, a TrackSubscribed event will
9434
+ * be emitted.
9435
+ *
9436
+ * args: (pub: [[RemoteTrackPublication]],
9437
+ * status: [[TrackPublication.SubscriptionStatus]],
9438
+ * participant: [[RemoteParticipant]])
9439
9439
  */
9440
9440
 
9441
9441
  RoomEvent["TrackSubscriptionPermissionChanged"] = "trackSubscriptionPermissionChanged";
9442
- /**
9443
- * LiveKit will attempt to autoplay all audio tracks when you attach them to
9444
- * audio elements. However, if that fails, we'll notify you via AudioPlaybackStatusChanged.
9445
- * `Room.canPlayAudio` will indicate if audio playback is permitted.
9442
+ /**
9443
+ * LiveKit will attempt to autoplay all audio tracks when you attach them to
9444
+ * audio elements. However, if that fails, we'll notify you via AudioPlaybackStatusChanged.
9445
+ * `Room.canPlayAudio` will indicate if audio playback is permitted.
9446
9446
  */
9447
9447
 
9448
9448
  RoomEvent["AudioPlaybackStatusChanged"] = "audioPlaybackChanged";
9449
- /**
9450
- * When we have encountered an error while attempting to create a track.
9451
- * The errors take place in getUserMedia().
9452
- * Use MediaDeviceFailure.getFailure(error) to get the reason of failure.
9453
- * [[getAudioCreateError]] and [[getVideoCreateError]] will indicate if it had
9454
- * an error while creating the audio or video track respectively.
9455
- *
9456
- * args: (error: Error)
9449
+ /**
9450
+ * When we have encountered an error while attempting to create a track.
9451
+ * The errors take place in getUserMedia().
9452
+ * Use MediaDeviceFailure.getFailure(error) to get the reason of failure.
9453
+ * [[getAudioCreateError]] and [[getVideoCreateError]] will indicate if it had
9454
+ * an error while creating the audio or video track respectively.
9455
+ *
9456
+ * args: (error: Error)
9457
9457
  */
9458
9458
 
9459
9459
  RoomEvent["MediaDevicesError"] = "mediaDevicesError";
9460
- /**
9461
- * A participant's permission has changed. Currently only fired on LocalParticipant.
9462
- * args: (prevPermissions: [[ParticipantPermission]], participant: [[Participant]])
9460
+ /**
9461
+ * A participant's permission has changed. Currently only fired on LocalParticipant.
9462
+ * args: (prevPermissions: [[ParticipantPermission]], participant: [[Participant]])
9463
9463
  */
9464
9464
 
9465
9465
  RoomEvent["ParticipantPermissionsChanged"] = "participantPermissionsChanged";
@@ -9468,141 +9468,141 @@ var RoomEvent;
9468
9468
  var ParticipantEvent;
9469
9469
 
9470
9470
  (function (ParticipantEvent) {
9471
- /**
9472
- * When a new track is published to room *after* the local
9473
- * participant has joined. It will not fire for tracks that are already published.
9474
- *
9475
- * A track published doesn't mean the participant has subscribed to it. It's
9476
- * simply reflecting the state of the room.
9477
- *
9478
- * args: ([[RemoteTrackPublication]])
9471
+ /**
9472
+ * When a new track is published to room *after* the local
9473
+ * participant has joined. It will not fire for tracks that are already published.
9474
+ *
9475
+ * A track published doesn't mean the participant has subscribed to it. It's
9476
+ * simply reflecting the state of the room.
9477
+ *
9478
+ * args: ([[RemoteTrackPublication]])
9479
9479
  */
9480
9480
  ParticipantEvent["TrackPublished"] = "trackPublished";
9481
- /**
9482
- * Successfully subscribed to the [[RemoteParticipant]]'s track.
9483
- * This event will **always** fire as long as new tracks are ready for use.
9484
- *
9485
- * args: ([[RemoteTrack]], [[RemoteTrackPublication]])
9481
+ /**
9482
+ * Successfully subscribed to the [[RemoteParticipant]]'s track.
9483
+ * This event will **always** fire as long as new tracks are ready for use.
9484
+ *
9485
+ * args: ([[RemoteTrack]], [[RemoteTrackPublication]])
9486
9486
  */
9487
9487
 
9488
9488
  ParticipantEvent["TrackSubscribed"] = "trackSubscribed";
9489
- /**
9490
- * Could not subscribe to a track
9491
- *
9492
- * args: (track sid)
9489
+ /**
9490
+ * Could not subscribe to a track
9491
+ *
9492
+ * args: (track sid)
9493
9493
  */
9494
9494
 
9495
9495
  ParticipantEvent["TrackSubscriptionFailed"] = "trackSubscriptionFailed";
9496
- /**
9497
- * A [[RemoteParticipant]] has unpublished a track
9498
- *
9499
- * args: ([[RemoteTrackPublication]])
9496
+ /**
9497
+ * A [[RemoteParticipant]] has unpublished a track
9498
+ *
9499
+ * args: ([[RemoteTrackPublication]])
9500
9500
  */
9501
9501
 
9502
9502
  ParticipantEvent["TrackUnpublished"] = "trackUnpublished";
9503
- /**
9504
- * A subscribed track is no longer available. Clients should listen to this
9505
- * event and ensure they detach tracks.
9506
- *
9507
- * args: ([[RemoteTrack]], [[RemoteTrackPublication]])
9503
+ /**
9504
+ * A subscribed track is no longer available. Clients should listen to this
9505
+ * event and ensure they detach tracks.
9506
+ *
9507
+ * args: ([[RemoteTrack]], [[RemoteTrackPublication]])
9508
9508
  */
9509
9509
 
9510
9510
  ParticipantEvent["TrackUnsubscribed"] = "trackUnsubscribed";
9511
- /**
9512
- * A track that was muted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
9513
- *
9514
- * args: ([[TrackPublication]])
9511
+ /**
9512
+ * A track that was muted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
9513
+ *
9514
+ * args: ([[TrackPublication]])
9515
9515
  */
9516
9516
 
9517
9517
  ParticipantEvent["TrackMuted"] = "trackMuted";
9518
- /**
9519
- * A track that was unmuted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
9520
- *
9521
- * args: ([[TrackPublication]])
9518
+ /**
9519
+ * A track that was unmuted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
9520
+ *
9521
+ * args: ([[TrackPublication]])
9522
9522
  */
9523
9523
 
9524
9524
  ParticipantEvent["TrackUnmuted"] = "trackUnmuted";
9525
- /**
9526
- * A local track was published successfully. This event is helpful to know
9527
- * when to update your local UI with the newly published track.
9528
- *
9529
- * args: ([[LocalTrackPublication]])
9525
+ /**
9526
+ * A local track was published successfully. This event is helpful to know
9527
+ * when to update your local UI with the newly published track.
9528
+ *
9529
+ * args: ([[LocalTrackPublication]])
9530
9530
  */
9531
9531
 
9532
9532
  ParticipantEvent["LocalTrackPublished"] = "localTrackPublished";
9533
- /**
9534
- * A local track was unpublished. This event is helpful to know when to remove
9535
- * the local track from your UI.
9536
- *
9537
- * When a user stops sharing their screen by pressing "End" on the browser UI,
9538
- * this event will also fire.
9539
- *
9540
- * args: ([[LocalTrackPublication]])
9533
+ /**
9534
+ * A local track was unpublished. This event is helpful to know when to remove
9535
+ * the local track from your UI.
9536
+ *
9537
+ * When a user stops sharing their screen by pressing "End" on the browser UI,
9538
+ * this event will also fire.
9539
+ *
9540
+ * args: ([[LocalTrackPublication]])
9541
9541
  */
9542
9542
 
9543
9543
  ParticipantEvent["LocalTrackUnpublished"] = "localTrackUnpublished";
9544
- /**
9545
- * @deprecated Use ParticipantMetadataChanged instead
9546
- * @internal
9544
+ /**
9545
+ * @deprecated Use ParticipantMetadataChanged instead
9546
+ * @internal
9547
9547
  */
9548
9548
 
9549
9549
  ParticipantEvent["MetadataChanged"] = "metadataChanged";
9550
- /**
9551
- * Participant metadata is a simple way for app-specific state to be pushed to
9552
- * all users.
9553
- * When RoomService.UpdateParticipantMetadata is called to change a participant's
9554
- * state, *all* participants in the room will fire this event.
9555
- * To access the current metadata, see [[Participant.metadata]].
9556
- *
9557
- * args: (prevMetadata: string)
9558
- *
9550
+ /**
9551
+ * Participant metadata is a simple way for app-specific state to be pushed to
9552
+ * all users.
9553
+ * When RoomService.UpdateParticipantMetadata is called to change a participant's
9554
+ * state, *all* participants in the room will fire this event.
9555
+ * To access the current metadata, see [[Participant.metadata]].
9556
+ *
9557
+ * args: (prevMetadata: string)
9558
+ *
9559
9559
  */
9560
9560
 
9561
9561
  ParticipantEvent["ParticipantMetadataChanged"] = "participantMetadataChanged";
9562
- /**
9563
- * Data received from this participant as sender.
9564
- * Data packets provides the ability to use LiveKit to send/receive arbitrary payloads.
9565
- * All participants in the room will receive the messages sent to the room.
9566
- *
9567
- * args: (payload: Uint8Array, kind: [[DataPacket_Kind]])
9562
+ /**
9563
+ * Data received from this participant as sender.
9564
+ * Data packets provides the ability to use LiveKit to send/receive arbitrary payloads.
9565
+ * All participants in the room will receive the messages sent to the room.
9566
+ *
9567
+ * args: (payload: Uint8Array, kind: [[DataPacket_Kind]])
9568
9568
  */
9569
9569
 
9570
9570
  ParticipantEvent["DataReceived"] = "dataReceived";
9571
- /**
9572
- * Has speaking status changed for the current participant
9573
- *
9574
- * args: (speaking: boolean)
9571
+ /**
9572
+ * Has speaking status changed for the current participant
9573
+ *
9574
+ * args: (speaking: boolean)
9575
9575
  */
9576
9576
 
9577
9577
  ParticipantEvent["IsSpeakingChanged"] = "isSpeakingChanged";
9578
- /**
9579
- * Connection quality was changed for a Participant. It'll receive updates
9580
- * from the local participant, as well as any [[RemoteParticipant]]s that we are
9581
- * subscribed to.
9582
- *
9583
- * args: (connectionQuality: [[ConnectionQuality]])
9578
+ /**
9579
+ * Connection quality was changed for a Participant. It'll receive updates
9580
+ * from the local participant, as well as any [[RemoteParticipant]]s that we are
9581
+ * subscribed to.
9582
+ *
9583
+ * args: (connectionQuality: [[ConnectionQuality]])
9584
9584
  */
9585
9585
 
9586
9586
  ParticipantEvent["ConnectionQualityChanged"] = "connectionQualityChanged";
9587
- /**
9588
- * StreamState indicates if a subscribed track has been paused by the SFU
9589
- * (typically this happens because of subscriber's bandwidth constraints)
9590
- *
9591
- * When bandwidth conditions allow, the track will be resumed automatically.
9592
- * TrackStreamStateChanged will also be emitted when that happens.
9593
- *
9594
- * args: (pub: [[RemoteTrackPublication]], streamState: [[Track.StreamState]])
9587
+ /**
9588
+ * StreamState indicates if a subscribed track has been paused by the SFU
9589
+ * (typically this happens because of subscriber's bandwidth constraints)
9590
+ *
9591
+ * When bandwidth conditions allow, the track will be resumed automatically.
9592
+ * TrackStreamStateChanged will also be emitted when that happens.
9593
+ *
9594
+ * args: (pub: [[RemoteTrackPublication]], streamState: [[Track.StreamState]])
9595
9595
  */
9596
9596
 
9597
9597
  ParticipantEvent["TrackStreamStateChanged"] = "trackStreamStateChanged";
9598
- /**
9599
- * One of subscribed tracks have changed its permissions for the current
9600
- * participant. If permission was revoked, then the track will no longer
9601
- * be subscribed. If permission was granted, a TrackSubscribed event will
9602
- * be emitted.
9603
- *
9604
- * args: (pub: [[RemoteTrackPublication]],
9605
- * status: [[TrackPublication.SubscriptionStatus]])
9598
+ /**
9599
+ * One of subscribed tracks have changed its permissions for the current
9600
+ * participant. If permission was revoked, then the track will no longer
9601
+ * be subscribed. If permission was granted, a TrackSubscribed event will
9602
+ * be emitted.
9603
+ *
9604
+ * args: (pub: [[RemoteTrackPublication]],
9605
+ * status: [[TrackPublication.SubscriptionStatus]])
9606
9606
  */
9607
9607
 
9608
9608
  ParticipantEvent["TrackSubscriptionPermissionChanged"] = "trackSubscriptionPermissionChanged"; // fired only on LocalParticipant
@@ -9610,9 +9610,9 @@ var ParticipantEvent;
9610
9610
  /** @internal */
9611
9611
 
9612
9612
  ParticipantEvent["MediaDevicesError"] = "mediaDevicesError";
9613
- /**
9614
- * A participant's permission has changed. Currently only fired on LocalParticipant.
9615
- * args: (prevPermissions: [[ParticipantPermission]])
9613
+ /**
9614
+ * A participant's permission has changed. Currently only fired on LocalParticipant.
9615
+ * args: (prevPermissions: [[ParticipantPermission]])
9616
9616
  */
9617
9617
 
9618
9618
  ParticipantEvent["ParticipantPermissionsChanged"] = "participantPermissionsChanged";
@@ -9655,9 +9655,9 @@ var TrackEvent;
9655
9655
  /** @internal */
9656
9656
 
9657
9657
  TrackEvent["AudioPlaybackFailed"] = "audioPlaybackFailed";
9658
- /**
9659
- * @internal
9660
- * Only fires on LocalAudioTrack instances
9658
+ /**
9659
+ * @internal
9660
+ * Only fires on LocalAudioTrack instances
9661
9661
  */
9662
9662
 
9663
9663
  TrackEvent["AudioSilenceDetected"] = "audioSilenceDetected";
@@ -9673,15 +9673,15 @@ var TrackEvent;
9673
9673
  /** @internal */
9674
9674
 
9675
9675
  TrackEvent["ElementDetached"] = "elementDetached";
9676
- /**
9677
- * @internal
9678
- * Only fires on LocalTracks
9676
+ /**
9677
+ * @internal
9678
+ * Only fires on LocalTracks
9679
9679
  */
9680
9680
 
9681
9681
  TrackEvent["UpstreamPaused"] = "upstreamPaused";
9682
- /**
9683
- * @internal
9684
- * Only fires on LocalTracks
9682
+ /**
9683
+ * @internal
9684
+ * Only fires on LocalTracks
9685
9685
  */
9686
9686
 
9687
9687
  TrackEvent["UpstreamResumed"] = "upstreamResumed";
@@ -10719,8 +10719,8 @@ class LocalTrack extends Track {
10719
10719
  get isUpstreamPaused() {
10720
10720
  return this._isUpstreamPaused;
10721
10721
  }
10722
- /**
10723
- * @returns DeviceID of the device that is currently being used for this track
10722
+ /**
10723
+ * @returns DeviceID of the device that is currently being used for this track
10724
10724
  */
10725
10725
 
10726
10726
 
@@ -10948,9 +10948,9 @@ function constraintsForOptions(options) {
10948
10948
 
10949
10949
  return constraints;
10950
10950
  }
10951
- /**
10952
- * This function detects silence on a given [[Track]] instance.
10953
- * Returns true if the track seems to be entirely silent.
10951
+ /**
10952
+ * This function detects silence on a given [[Track]] instance.
10953
+ * Returns true if the track seems to be entirely silent.
10954
10954
  */
10955
10955
 
10956
10956
  async function detectSilence(track) {
@@ -10973,8 +10973,8 @@ async function detectSilence(track) {
10973
10973
 
10974
10974
  return false;
10975
10975
  }
10976
- /**
10977
- * @internal
10976
+ /**
10977
+ * @internal
10978
10978
  */
10979
10979
 
10980
10980
  function getNewAudioContext() {
@@ -11302,9 +11302,9 @@ class LocalVideoTrack extends LocalTrack {
11302
11302
 
11303
11303
  await this.restart(constraints);
11304
11304
  }
11305
- /**
11306
- * @internal
11307
- * Sets layers that should be publishing
11305
+ /**
11306
+ * @internal
11307
+ * Sets layers that should be publishing
11308
11308
  */
11309
11309
 
11310
11310
 
@@ -11510,8 +11510,8 @@ class RemoteAudioTrack extends RemoteTrack {
11510
11510
 
11511
11511
  this.elementVolume = 1;
11512
11512
  }
11513
- /**
11514
- * sets the volume for all attached audio elements
11513
+ /**
11514
+ * sets the volume for all attached audio elements
11515
11515
  */
11516
11516
 
11517
11517
 
@@ -11522,8 +11522,8 @@ class RemoteAudioTrack extends RemoteTrack {
11522
11522
 
11523
11523
  this.elementVolume = volume;
11524
11524
  }
11525
- /**
11526
- * gets the volume for all attached audio elements
11525
+ /**
11526
+ * gets the volume for all attached audio elements
11527
11527
  */
11528
11528
 
11529
11529
 
@@ -11876,8 +11876,8 @@ class TrackPublication extends events.exports.EventEmitter {
11876
11876
  get isSubscribed() {
11877
11877
  return this.track !== undefined;
11878
11878
  }
11879
- /**
11880
- * an [AudioTrack] if this publication holds an audio track
11879
+ /**
11880
+ * an [AudioTrack] if this publication holds an audio track
11881
11881
  */
11882
11882
 
11883
11883
 
@@ -11886,8 +11886,8 @@ class TrackPublication extends events.exports.EventEmitter {
11886
11886
  return this.track;
11887
11887
  }
11888
11888
  }
11889
- /**
11890
- * an [VideoTrack] if this publication holds a video track
11889
+ /**
11890
+ * an [VideoTrack] if this publication holds a video track
11891
11891
  */
11892
11892
 
11893
11893
 
@@ -11973,8 +11973,8 @@ class LocalTrackPublication extends TrackPublication {
11973
11973
  get videoTrack() {
11974
11974
  return super.videoTrack;
11975
11975
  }
11976
- /**
11977
- * Mute the track associated with this publication
11976
+ /**
11977
+ * Mute the track associated with this publication
11978
11978
  */
11979
11979
 
11980
11980
 
@@ -11983,8 +11983,8 @@ class LocalTrackPublication extends TrackPublication {
11983
11983
 
11984
11984
  return (_a = this.track) === null || _a === void 0 ? void 0 : _a.mute();
11985
11985
  }
11986
- /**
11987
- * Unmute track associated with this publication
11986
+ /**
11987
+ * Unmute track associated with this publication
11988
11988
  */
11989
11989
 
11990
11990
 
@@ -11993,10 +11993,10 @@ class LocalTrackPublication extends TrackPublication {
11993
11993
 
11994
11994
  return (_a = this.track) === null || _a === void 0 ? void 0 : _a.unmute();
11995
11995
  }
11996
- /**
11997
- * Pauses the media stream track associated with this publication from being sent to the server
11998
- * and signals "muted" event to other participants
11999
- * Useful if you want to pause the stream without pausing the local media stream track
11996
+ /**
11997
+ * Pauses the media stream track associated with this publication from being sent to the server
11998
+ * and signals "muted" event to other participants
11999
+ * Useful if you want to pause the stream without pausing the local media stream track
12000
12000
  */
12001
12001
 
12002
12002
 
@@ -12005,9 +12005,9 @@ class LocalTrackPublication extends TrackPublication {
12005
12005
 
12006
12006
  await ((_a = this.track) === null || _a === void 0 ? void 0 : _a.pauseUpstream());
12007
12007
  }
12008
- /**
12009
- * Resumes sending the media stream track associated with this publication to the server after a call to [[pauseUpstream()]]
12010
- * and signals "unmuted" event to other participants (unless the track is explicitly muted)
12008
+ /**
12009
+ * Resumes sending the media stream track associated with this publication to the server after a call to [[pauseUpstream()]]
12010
+ * and signals "unmuted" event to other participants (unless the track is explicitly muted)
12011
12011
  */
12012
12012
 
12013
12013
 
@@ -12052,8 +12052,8 @@ var AudioPresets;
12052
12052
  maxBitrate: 32000
12053
12053
  };
12054
12054
  })(AudioPresets || (AudioPresets = {}));
12055
- /**
12056
- * Sane presets for video resolution/encoding
12055
+ /**
12056
+ * Sane presets for video resolution/encoding
12057
12057
  */
12058
12058
 
12059
12059
 
@@ -12083,8 +12083,8 @@ const VideoPresets = {
12083
12083
  /** @deprecated */
12084
12084
  fhd: new VideoPreset(1920, 1080, 3000000, 30)
12085
12085
  };
12086
- /**
12087
- * Four by three presets
12086
+ /**
12087
+ * Four by three presets
12088
12088
  */
12089
12089
 
12090
12090
  const VideoPresets43 = {
@@ -12182,11 +12182,11 @@ class Participant extends events.exports.EventEmitter {
12182
12182
  getTracks() {
12183
12183
  return Array.from(this.tracks.values());
12184
12184
  }
12185
- /**
12186
- * Finds the first track that matches the source filter, for example, getting
12187
- * the user's camera track with getTrackBySource(Track.Source.Camera).
12188
- * @param source
12189
- * @returns
12185
+ /**
12186
+ * Finds the first track that matches the source filter, for example, getting
12187
+ * the user's camera track with getTrackBySource(Track.Source.Camera).
12188
+ * @param source
12189
+ * @returns
12190
12190
  */
12191
12191
 
12192
12192
 
@@ -12219,10 +12219,10 @@ class Participant extends events.exports.EventEmitter {
12219
12219
  }
12220
12220
  }
12221
12221
  }
12222
- /**
12223
- * Finds the first track that matches the track's name.
12224
- * @param name
12225
- * @returns
12222
+ /**
12223
+ * Finds the first track that matches the track's name.
12224
+ * @param name
12225
+ * @returns
12226
12226
  */
12227
12227
 
12228
12228
 
@@ -12618,9 +12618,9 @@ class RemoteTrackPublication extends TrackPublication {
12618
12618
  this.emitTrackUpdate();
12619
12619
  };
12620
12620
  }
12621
- /**
12622
- * Subscribe or unsubscribe to this remote track
12623
- * @param subscribed true to subscribe to a track, false to unsubscribe
12621
+ /**
12622
+ * Subscribe or unsubscribe to this remote track
12623
+ * @param subscribed true to subscribe to a track, false to unsubscribe
12624
12624
  */
12625
12625
 
12626
12626
 
@@ -12650,8 +12650,8 @@ class RemoteTrackPublication extends TrackPublication {
12650
12650
 
12651
12651
  return TrackPublication.SubscriptionStatus.Subscribed;
12652
12652
  }
12653
- /**
12654
- * Returns true if track is subscribed, and ready for playback
12653
+ /**
12654
+ * Returns true if track is subscribed, and ready for playback
12655
12655
  */
12656
12656
 
12657
12657
 
@@ -12670,11 +12670,11 @@ class RemoteTrackPublication extends TrackPublication {
12670
12670
  get isEnabled() {
12671
12671
  return !this.disabled;
12672
12672
  }
12673
- /**
12674
- * disable server from sending down data for this track. this is useful when
12675
- * the participant is off screen, you may disable streaming down their video
12676
- * to reduce bandwidth requirements
12677
- * @param enabled
12673
+ /**
12674
+ * disable server from sending down data for this track. this is useful when
12675
+ * the participant is off screen, you may disable streaming down their video
12676
+ * to reduce bandwidth requirements
12677
+ * @param enabled
12678
12678
  */
12679
12679
 
12680
12680
 
@@ -12686,12 +12686,12 @@ class RemoteTrackPublication extends TrackPublication {
12686
12686
  this.disabled = !enabled;
12687
12687
  this.emitTrackUpdate();
12688
12688
  }
12689
- /**
12690
- * for tracks that support simulcasting, adjust subscribed quality
12691
- *
12692
- * This indicates the highest quality the client can accept. if network
12693
- * bandwidth does not allow, server will automatically reduce quality to
12694
- * optimize for uninterrupted video
12689
+ /**
12690
+ * for tracks that support simulcasting, adjust subscribed quality
12691
+ *
12692
+ * This indicates the highest quality the client can accept. if network
12693
+ * bandwidth does not allow, server will automatically reduce quality to
12694
+ * optimize for uninterrupted video
12695
12695
  */
12696
12696
 
12697
12697
 
@@ -12851,8 +12851,8 @@ class RemoteParticipant extends Participant {
12851
12851
  return track;
12852
12852
  }
12853
12853
  }
12854
- /**
12855
- * sets the volume on the participant's microphone track if it exists.
12854
+ /**
12855
+ * sets the volume on the participant's microphone track if it exists.
12856
12856
  */
12857
12857
 
12858
12858
 
@@ -12863,9 +12863,9 @@ class RemoteParticipant extends Participant {
12863
12863
  audioPublication.track.setVolume(volume);
12864
12864
  }
12865
12865
  }
12866
- /**
12867
- * gets the volume on the participant's microphone track
12868
- * returns undefined if no microphone track exists
12866
+ /**
12867
+ * gets the volume on the participant's microphone track
12868
+ * returns undefined if no microphone track exists
12869
12869
  */
12870
12870
 
12871
12871
 
@@ -13174,31 +13174,31 @@ class LocalParticipant extends Participant {
13174
13174
  return track;
13175
13175
  }
13176
13176
  }
13177
- /**
13178
- * Enable or disable a participant's camera track.
13179
- *
13180
- * If a track has already published, it'll mute or unmute the track.
13181
- * Resolves with a `LocalTrackPublication` instance if successful and `undefined` otherwise
13177
+ /**
13178
+ * Enable or disable a participant's camera track.
13179
+ *
13180
+ * If a track has already published, it'll mute or unmute the track.
13181
+ * Resolves with a `LocalTrackPublication` instance if successful and `undefined` otherwise
13182
13182
  */
13183
13183
 
13184
13184
 
13185
13185
  setCameraEnabled(enabled) {
13186
13186
  return this.setTrackEnabled(Track.Source.Camera, enabled);
13187
13187
  }
13188
- /**
13189
- * Enable or disable a participant's microphone track.
13190
- *
13191
- * If a track has already published, it'll mute or unmute the track.
13192
- * Resolves with a `LocalTrackPublication` instance if successful and `undefined` otherwise
13188
+ /**
13189
+ * Enable or disable a participant's microphone track.
13190
+ *
13191
+ * If a track has already published, it'll mute or unmute the track.
13192
+ * Resolves with a `LocalTrackPublication` instance if successful and `undefined` otherwise
13193
13193
  */
13194
13194
 
13195
13195
 
13196
13196
  setMicrophoneEnabled(enabled) {
13197
13197
  return this.setTrackEnabled(Track.Source.Microphone, enabled);
13198
13198
  }
13199
- /**
13200
- * Start or stop sharing a participant's screen
13201
- * Resolves with a `LocalTrackPublication` instance if successful and `undefined` otherwise
13199
+ /**
13200
+ * Start or stop sharing a participant's screen
13201
+ * Resolves with a `LocalTrackPublication` instance if successful and `undefined` otherwise
13202
13202
  */
13203
13203
 
13204
13204
 
@@ -13218,10 +13218,10 @@ class LocalParticipant extends Participant {
13218
13218
 
13219
13219
  return changed;
13220
13220
  }
13221
- /**
13222
- * Enable or disable publishing for a track by source. This serves as a simple
13223
- * way to manage the common tracks (camera, mic, or screen share).
13224
- * Resolves with LocalTrackPublication if successful and void otherwise
13221
+ /**
13222
+ * Enable or disable publishing for a track by source. This serves as a simple
13223
+ * way to manage the common tracks (camera, mic, or screen share).
13224
+ * Resolves with LocalTrackPublication if successful and void otherwise
13225
13225
  */
13226
13226
 
13227
13227
 
@@ -13294,9 +13294,9 @@ class LocalParticipant extends Participant {
13294
13294
 
13295
13295
  return track;
13296
13296
  }
13297
- /**
13298
- * Publish both camera and microphone at the same time. This is useful for
13299
- * displaying a single Permission Dialog box to the end user.
13297
+ /**
13298
+ * Publish both camera and microphone at the same time. This is useful for
13299
+ * displaying a single Permission Dialog box to the end user.
13300
13300
  */
13301
13301
 
13302
13302
 
@@ -13320,10 +13320,10 @@ class LocalParticipant extends Participant {
13320
13320
  this.pendingPublishing.delete(Track.Source.Microphone);
13321
13321
  }
13322
13322
  }
13323
- /**
13324
- * Create local camera and/or microphone tracks
13325
- * @param options
13326
- * @returns
13323
+ /**
13324
+ * Create local camera and/or microphone tracks
13325
+ * @param options
13326
+ * @returns
13327
13327
  */
13328
13328
 
13329
13329
 
@@ -13381,10 +13381,10 @@ class LocalParticipant extends Participant {
13381
13381
  return track;
13382
13382
  });
13383
13383
  }
13384
- /**
13385
- * Creates a screen capture tracks with getDisplayMedia().
13386
- * A LocalVideoTrack is always created and returned.
13387
- * If { audio: true }, and the browser supports audio capture, a LocalAudioTrack is also created.
13384
+ /**
13385
+ * Creates a screen capture tracks with getDisplayMedia().
13386
+ * A LocalVideoTrack is always created and returned.
13387
+ * If { audio: true }, and the browser supports audio capture, a LocalAudioTrack is also created.
13388
13388
  */
13389
13389
 
13390
13390
 
@@ -13433,10 +13433,10 @@ class LocalParticipant extends Participant {
13433
13433
 
13434
13434
  return localTracks;
13435
13435
  }
13436
- /**
13437
- * Publish a new track to the room
13438
- * @param track
13439
- * @param options
13436
+ /**
13437
+ * Publish a new track to the room
13438
+ * @param track
13439
+ * @param options
13440
13440
  */
13441
13441
 
13442
13442
 
@@ -13649,16 +13649,16 @@ class LocalParticipant extends Participant {
13649
13649
  });
13650
13650
  return publications;
13651
13651
  }
13652
- /**
13653
- * Publish a new data payload to the room. Data will be forwarded to each
13654
- * participant in the room if the destination argument is empty
13655
- *
13656
- * @param data Uint8Array of the payload. To send string data, use TextEncoder.encode
13657
- * @param kind whether to send this as reliable or lossy.
13658
- * For data that you need delivery guarantee (such as chat messages), use Reliable.
13659
- * For data that should arrive as quickly as possible, but you are ok with dropped
13660
- * packets, use Lossy.
13661
- * @param destination the participants who will receive the message
13652
+ /**
13653
+ * Publish a new data payload to the room. Data will be forwarded to each
13654
+ * participant in the room if the destination argument is empty
13655
+ *
13656
+ * @param data Uint8Array of the payload. To send string data, use TextEncoder.encode
13657
+ * @param kind whether to send this as reliable or lossy.
13658
+ * For data that you need delivery guarantee (such as chat messages), use Reliable.
13659
+ * For data that should arrive as quickly as possible, but you are ok with dropped
13660
+ * packets, use Lossy.
13661
+ * @param destination the participants who will receive the message
13662
13662
  */
13663
13663
 
13664
13664
 
@@ -13685,22 +13685,22 @@ class LocalParticipant extends Participant {
13685
13685
  };
13686
13686
  await this.engine.sendDataPacket(packet, kind);
13687
13687
  }
13688
- /**
13689
- * Control who can subscribe to LocalParticipant's published tracks.
13690
- *
13691
- * By default, all participants can subscribe. This allows fine-grained control over
13692
- * who is able to subscribe at a participant and track level.
13693
- *
13694
- * Note: if access is given at a track-level (i.e. both [allParticipantsAllowed] and
13695
- * [ParticipantTrackPermission.allTracksAllowed] are false), any newer published tracks
13696
- * will not grant permissions to any participants and will require a subsequent
13697
- * permissions update to allow subscription.
13698
- *
13699
- * @param allParticipantsAllowed Allows all participants to subscribe all tracks.
13700
- * Takes precedence over [[participantTrackPermissions]] if set to true.
13701
- * By default this is set to true.
13702
- * @param participantTrackPermissions Full list of individual permissions per
13703
- * participant/track. Any omitted participants will not receive any permissions.
13688
+ /**
13689
+ * Control who can subscribe to LocalParticipant's published tracks.
13690
+ *
13691
+ * By default, all participants can subscribe. This allows fine-grained control over
13692
+ * who is able to subscribe at a participant and track level.
13693
+ *
13694
+ * Note: if access is given at a track-level (i.e. both [allParticipantsAllowed] and
13695
+ * [ParticipantTrackPermission.allTracksAllowed] are false), any newer published tracks
13696
+ * will not grant permissions to any participants and will require a subsequent
13697
+ * permissions update to allow subscription.
13698
+ *
13699
+ * @param allParticipantsAllowed Allows all participants to subscribe all tracks.
13700
+ * Takes precedence over [[participantTrackPermissions]] if set to true.
13701
+ * By default this is set to true.
13702
+ * @param participantTrackPermissions Full list of individual permissions per
13703
+ * participant/track. Any omitted participants will not receive any permissions.
13704
13704
  */
13705
13705
 
13706
13706
 
@@ -18540,20 +18540,20 @@ var RoomState;
18540
18540
  RoomState["Connected"] = "connected";
18541
18541
  RoomState["Reconnecting"] = "reconnecting";
18542
18542
  })(RoomState || (RoomState = {}));
18543
- /**
18544
- * In LiveKit, a room is the logical grouping for a list of participants.
18545
- * Participants in a room can publish tracks, and subscribe to others' tracks.
18546
- *
18547
- * a Room fires [[RoomEvent | RoomEvents]].
18548
- *
18549
- * @noInheritDoc
18543
+ /**
18544
+ * In LiveKit, a room is the logical grouping for a list of participants.
18545
+ * Participants in a room can publish tracks, and subscribe to others' tracks.
18546
+ *
18547
+ * a Room fires [[RoomEvent | RoomEvents]].
18548
+ *
18549
+ * @noInheritDoc
18550
18550
  */
18551
18551
 
18552
18552
 
18553
18553
  class Room extends events.exports.EventEmitter {
18554
- /**
18555
- * Creates a new Room, the primary construct for a LiveKit session.
18556
- * @param options
18554
+ /**
18555
+ * Creates a new Room, the primary construct for a LiveKit session.
18556
+ * @param options
18557
18557
  */
18558
18558
  constructor(options) {
18559
18559
  var _this;
@@ -18563,9 +18563,9 @@ class Room extends events.exports.EventEmitter {
18563
18563
  super();
18564
18564
  _this = this;
18565
18565
  this.state = RoomState.Disconnected;
18566
- /**
18567
- * list of participants that are actively speaking. when this changes
18568
- * a [[RoomEvent.ActiveSpeakersChanged]] event is fired
18566
+ /**
18567
+ * list of participants that are actively speaking. when this changes
18568
+ * a [[RoomEvent.ActiveSpeakersChanged]] event is fired
18569
18569
  */
18570
18570
 
18571
18571
  this.activeSpeakers = []; // available after connected
@@ -18677,8 +18677,8 @@ class Room extends events.exports.EventEmitter {
18677
18677
  });
18678
18678
  });
18679
18679
  };
18680
- /**
18681
- * disconnects the room, emits [[RoomEvent.Disconnected]]
18680
+ /**
18681
+ * disconnects the room, emits [[RoomEvent.Disconnected]]
18682
18682
  */
18683
18683
 
18684
18684
 
@@ -18973,13 +18973,13 @@ class Room extends events.exports.EventEmitter {
18973
18973
  }
18974
18974
  }).on(EngineEvent.Restarting, this.handleRestarting).on(EngineEvent.Restarted, this.handleRestarted);
18975
18975
  }
18976
- /**
18977
- * getLocalDevices abstracts navigator.mediaDevices.enumerateDevices.
18978
- * In particular, it handles Chrome's unique behavior of creating `default`
18979
- * devices. When encountered, it'll be removed from the list of devices.
18980
- * The actual default device will be placed at top.
18981
- * @param kind
18982
- * @returns a list of available local devices
18976
+ /**
18977
+ * getLocalDevices abstracts navigator.mediaDevices.enumerateDevices.
18978
+ * In particular, it handles Chrome's unique behavior of creating `default`
18979
+ * devices. When encountered, it'll be removed from the list of devices.
18980
+ * The actual default device will be placed at top.
18981
+ * @param kind
18982
+ * @returns a list of available local devices
18983
18983
  */
18984
18984
 
18985
18985
 
@@ -18987,10 +18987,10 @@ class Room extends events.exports.EventEmitter {
18987
18987
  let requestPermissions = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
18988
18988
  return DeviceManager.getInstance().getDevices(kind, requestPermissions);
18989
18989
  }
18990
- /**
18991
- * retrieves a participant by identity
18992
- * @param identity
18993
- * @returns
18990
+ /**
18991
+ * retrieves a participant by identity
18992
+ * @param identity
18993
+ * @returns
18994
18994
  */
18995
18995
 
18996
18996
 
@@ -19005,8 +19005,8 @@ class Room extends events.exports.EventEmitter {
19005
19005
  return this.localParticipant;
19006
19006
  }
19007
19007
  }
19008
- /**
19009
- * @internal for testing
19008
+ /**
19009
+ * @internal for testing
19010
19010
  */
19011
19011
 
19012
19012
 
@@ -19043,12 +19043,12 @@ class Room extends events.exports.EventEmitter {
19043
19043
  this.engine.client.sendSimulateScenario(req);
19044
19044
  }
19045
19045
  }
19046
- /**
19047
- * Browsers have different policies regarding audio playback. Most requiring
19048
- * some form of user interaction (click/tap/etc).
19049
- * In those cases, audio will be silent until a click/tap triggering one of the following
19050
- * - `startAudio`
19051
- * - `getUserMedia`
19046
+ /**
19047
+ * Browsers have different policies regarding audio playback. Most requiring
19048
+ * some form of user interaction (click/tap/etc).
19049
+ * In those cases, audio will be silent until a click/tap triggering one of the following
19050
+ * - `startAudio`
19051
+ * - `getUserMedia`
19052
19052
  */
19053
19053
 
19054
19054
 
@@ -19073,23 +19073,23 @@ class Room extends events.exports.EventEmitter {
19073
19073
  throw err;
19074
19074
  }
19075
19075
  }
19076
- /**
19077
- * Returns true if audio playback is enabled
19076
+ /**
19077
+ * Returns true if audio playback is enabled
19078
19078
  */
19079
19079
 
19080
19080
 
19081
19081
  get canPlaybackAudio() {
19082
19082
  return this.audioEnabled;
19083
19083
  }
19084
- /**
19085
- * Switches all active device used in this room to the given device.
19086
- *
19087
- * Note: setting AudioOutput is not supported on some browsers. See [setSinkId](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setSinkId#browser_compatibility)
19088
- *
19089
- * @param kind use `videoinput` for camera track,
19090
- * `audioinput` for microphone track,
19091
- * `audiooutput` to set speaker for all incoming audio tracks
19092
- * @param deviceId
19084
+ /**
19085
+ * Switches all active device used in this room to the given device.
19086
+ *
19087
+ * Note: setting AudioOutput is not supported on some browsers. See [setSinkId](https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/setSinkId#browser_compatibility)
19088
+ *
19089
+ * @param kind use `videoinput` for camera track,
19090
+ * `audioinput` for microphone track,
19091
+ * `audiooutput` to set speaker for all incoming audio tracks
19092
+ * @param deviceId
19093
19093
  */
19094
19094
 
19095
19095
 
@@ -19285,10 +19285,10 @@ class Room extends events.exports.EventEmitter {
19285
19285
  }
19286
19286
 
19287
19287
  const previousSdp = this.engine.subscriber.pc.localDescription;
19288
- /* 1. autosubscribe on, so subscribed tracks = all tracks - unsub tracks,
19289
- in this case, we send unsub tracks, so server add all tracks to this
19290
- subscribe pc and unsub special tracks from it.
19291
- 2. autosubscribe off, we send subscribed tracks.
19288
+ /* 1. autosubscribe on, so subscribed tracks = all tracks - unsub tracks,
19289
+ in this case, we send unsub tracks, so server add all tracks to this
19290
+ subscribe pc and unsub special tracks from it.
19291
+ 2. autosubscribe off, we send subscribed tracks.
19292
19292
  */
19293
19293
 
19294
19294
  const sendUnsub = ((_a = this.connOptions) === null || _a === void 0 ? void 0 : _a.autoSubscribe) || false;
@@ -19314,9 +19314,9 @@ class Room extends events.exports.EventEmitter {
19314
19314
  dataChannels: this.localParticipant.dataChannelsInfo()
19315
19315
  });
19316
19316
  }
19317
- /**
19318
- * After resuming, we'll need to notify the server of the current
19319
- * subscription settings.
19317
+ /**
19318
+ * After resuming, we'll need to notify the server of the current
19319
+ * subscription settings.
19320
19320
  */
19321
19321
 
19322
19322
 
@@ -19345,24 +19345,24 @@ class Room extends events.exports.EventEmitter {
19345
19345
 
19346
19346
  }
19347
19347
 
19348
- /**
19349
- * @deprecated Use room.connect() instead
19350
- *
19351
- * Connects to a LiveKit room, shorthand for `new Room()` and [[Room.connect]]
19352
- *
19353
- * ```typescript
19354
- * connect('wss://myhost.livekit.io', token, {
19355
- * // publish audio and video tracks on joining
19356
- * audio: true,
19357
- * video: true,
19358
- * captureDefaults: {
19359
- * facingMode: 'user',
19360
- * },
19361
- * })
19362
- * ```
19363
- * @param url URL to LiveKit server
19364
- * @param token AccessToken, a JWT token that includes authentication and room details
19365
- * @param options
19348
+ /**
19349
+ * @deprecated Use room.connect() instead
19350
+ *
19351
+ * Connects to a LiveKit room, shorthand for `new Room()` and [[Room.connect]]
19352
+ *
19353
+ * ```typescript
19354
+ * connect('wss://myhost.livekit.io', token, {
19355
+ * // publish audio and video tracks on joining
19356
+ * audio: true,
19357
+ * video: true,
19358
+ * captureDefaults: {
19359
+ * facingMode: 'user',
19360
+ * },
19361
+ * })
19362
+ * ```
19363
+ * @param url URL to LiveKit server
19364
+ * @param token AccessToken, a JWT token that includes authentication and room details
19365
+ * @param options
19366
19366
  */
19367
19367
 
19368
19368
  async function connect(url, token, options) {
@@ -19440,11 +19440,11 @@ async function connect(url, token, options) {
19440
19440
  return room;
19441
19441
  }
19442
19442
 
19443
- /**
19444
- * Creates a local video and audio track at the same time. When acquiring both
19445
- * audio and video tracks together, it'll display a single permission prompt to
19446
- * the user instead of two separate ones.
19447
- * @param options
19443
+ /**
19444
+ * Creates a local video and audio track at the same time. When acquiring both
19445
+ * audio and video tracks together, it'll display a single permission prompt to
19446
+ * the user instead of two separate ones.
19447
+ * @param options
19448
19448
  */
19449
19449
 
19450
19450
  async function createLocalTracks(options) {
@@ -19480,9 +19480,9 @@ async function createLocalTracks(options) {
19480
19480
  return track;
19481
19481
  });
19482
19482
  }
19483
- /**
19484
- * Creates a [[LocalVideoTrack]] with getUserMedia()
19485
- * @param options
19483
+ /**
19484
+ * Creates a [[LocalVideoTrack]] with getUserMedia()
19485
+ * @param options
19486
19486
  */
19487
19487
 
19488
19488
  async function createLocalVideoTrack(options) {
@@ -19499,10 +19499,10 @@ async function createLocalAudioTrack(options) {
19499
19499
  });
19500
19500
  return tracks[0];
19501
19501
  }
19502
- /**
19503
- * Creates a screen capture tracks with getDisplayMedia().
19504
- * A LocalVideoTrack is always created and returned.
19505
- * If { audio: true }, and the browser supports audio capture, a LocalAudioTrack is also created.
19502
+ /**
19503
+ * Creates a screen capture tracks with getDisplayMedia().
19504
+ * A LocalVideoTrack is always created and returned.
19505
+ * If { audio: true }, and the browser supports audio capture, a LocalAudioTrack is also created.
19506
19506
  */
19507
19507
 
19508
19508
  async function createLocalScreenTracks(options) {