@dtelecom/livekit-client 1.12.1
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.
- package/LICENSE +175 -0
- package/README.md +315 -0
- package/dist/@dtelecom/livekit-client.e2ee.worker.js +2 -0
- package/dist/@dtelecom/livekit-client.e2ee.worker.js.map +1 -0
- package/dist/@dtelecom/livekit-client.e2ee.worker.mjs +1633 -0
- package/dist/@dtelecom/livekit-client.e2ee.worker.mjs.map +1 -0
- package/dist/@dtelecom/livekit-client.esm.mjs +22545 -0
- package/dist/@dtelecom/livekit-client.esm.mjs.map +1 -0
- package/dist/@dtelecom/livekit-client.umd.js +2 -0
- package/dist/@dtelecom/livekit-client.umd.js.map +1 -0
- package/dist/@dtelecom/src/api/SignalClient.d.ts +102 -0
- package/dist/@dtelecom/src/api/SignalClient.d.ts.map +1 -0
- package/dist/@dtelecom/src/connectionHelper/ConnectionCheck.d.ts +26 -0
- package/dist/@dtelecom/src/connectionHelper/ConnectionCheck.d.ts.map +1 -0
- package/dist/@dtelecom/src/connectionHelper/checks/Checker.d.ts +59 -0
- package/dist/@dtelecom/src/connectionHelper/checks/Checker.d.ts.map +1 -0
- package/dist/@dtelecom/src/connectionHelper/checks/publishAudio.d.ts +6 -0
- package/dist/@dtelecom/src/connectionHelper/checks/publishAudio.d.ts.map +1 -0
- package/dist/@dtelecom/src/connectionHelper/checks/publishVideo.d.ts +6 -0
- package/dist/@dtelecom/src/connectionHelper/checks/publishVideo.d.ts.map +1 -0
- package/dist/@dtelecom/src/connectionHelper/checks/reconnect.d.ts +6 -0
- package/dist/@dtelecom/src/connectionHelper/checks/reconnect.d.ts.map +1 -0
- package/dist/@dtelecom/src/connectionHelper/checks/turn.d.ts +6 -0
- package/dist/@dtelecom/src/connectionHelper/checks/turn.d.ts.map +1 -0
- package/dist/@dtelecom/src/connectionHelper/checks/webrtc.d.ts +6 -0
- package/dist/@dtelecom/src/connectionHelper/checks/webrtc.d.ts.map +1 -0
- package/dist/@dtelecom/src/connectionHelper/checks/websocket.d.ts +6 -0
- package/dist/@dtelecom/src/connectionHelper/checks/websocket.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/E2eeManager.d.ts +47 -0
- package/dist/@dtelecom/src/e2ee/E2eeManager.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/KeyProvider.d.ts +44 -0
- package/dist/@dtelecom/src/e2ee/KeyProvider.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/constants.d.ts +15 -0
- package/dist/@dtelecom/src/e2ee/constants.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/errors.d.ts +11 -0
- package/dist/@dtelecom/src/e2ee/errors.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/index.d.ts +4 -0
- package/dist/@dtelecom/src/e2ee/index.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/types.d.ts +130 -0
- package/dist/@dtelecom/src/e2ee/types.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/utils.d.ts +24 -0
- package/dist/@dtelecom/src/e2ee/utils.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/worker/FrameCryptor.d.ts +176 -0
- package/dist/@dtelecom/src/e2ee/worker/FrameCryptor.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/worker/ParticipantKeyHandler.d.ts +65 -0
- package/dist/@dtelecom/src/e2ee/worker/ParticipantKeyHandler.d.ts.map +1 -0
- package/dist/@dtelecom/src/e2ee/worker/e2ee.worker.d.ts +2 -0
- package/dist/@dtelecom/src/e2ee/worker/e2ee.worker.d.ts.map +1 -0
- package/dist/@dtelecom/src/index.d.ts +38 -0
- package/dist/@dtelecom/src/index.d.ts.map +1 -0
- package/dist/@dtelecom/src/logger.d.ts +29 -0
- package/dist/@dtelecom/src/logger.d.ts.map +1 -0
- package/dist/@dtelecom/src/options.d.ts +104 -0
- package/dist/@dtelecom/src/options.d.ts.map +1 -0
- package/dist/@dtelecom/src/proto/livekit_models_pb.d.ts +1264 -0
- package/dist/@dtelecom/src/proto/livekit_models_pb.d.ts.map +1 -0
- package/dist/@dtelecom/src/proto/livekit_rtc_pb.d.ts +1373 -0
- package/dist/@dtelecom/src/proto/livekit_rtc_pb.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/DefaultReconnectPolicy.d.ts +8 -0
- package/dist/@dtelecom/src/room/DefaultReconnectPolicy.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/DeviceManager.d.ts +9 -0
- package/dist/@dtelecom/src/room/DeviceManager.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/PCTransport.d.ts +41 -0
- package/dist/@dtelecom/src/room/PCTransport.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/RTCEngine.d.ts +143 -0
- package/dist/@dtelecom/src/room/RTCEngine.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/ReconnectPolicy.d.ts +24 -0
- package/dist/@dtelecom/src/room/ReconnectPolicy.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/RegionUrlProvider.d.ts +17 -0
- package/dist/@dtelecom/src/room/RegionUrlProvider.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/Room.d.ts +248 -0
- package/dist/@dtelecom/src/room/Room.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/defaults.d.ts +8 -0
- package/dist/@dtelecom/src/room/defaults.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/errors.d.ts +43 -0
- package/dist/@dtelecom/src/room/errors.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/events.d.ts +477 -0
- package/dist/@dtelecom/src/room/events.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/participant/LocalParticipant.d.ts +177 -0
- package/dist/@dtelecom/src/room/participant/LocalParticipant.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/participant/Participant.d.ts +95 -0
- package/dist/@dtelecom/src/room/participant/Participant.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/participant/ParticipantTrackPermission.d.ts +26 -0
- package/dist/@dtelecom/src/room/participant/ParticipantTrackPermission.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/participant/RemoteParticipant.d.ts +55 -0
- package/dist/@dtelecom/src/room/participant/RemoteParticipant.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/participant/publishUtils.d.ts +28 -0
- package/dist/@dtelecom/src/room/participant/publishUtils.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/stats.d.ts +67 -0
- package/dist/@dtelecom/src/room/stats.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/timers.d.ts +13 -0
- package/dist/@dtelecom/src/room/timers.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/LocalAudioTrack.d.ts +25 -0
- package/dist/@dtelecom/src/room/track/LocalAudioTrack.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/LocalTrack.d.ts +78 -0
- package/dist/@dtelecom/src/room/track/LocalTrack.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/LocalTrackPublication.d.ts +38 -0
- package/dist/@dtelecom/src/room/track/LocalTrackPublication.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/LocalVideoTrack.d.ts +54 -0
- package/dist/@dtelecom/src/room/track/LocalVideoTrack.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/RemoteAudioTrack.d.ts +53 -0
- package/dist/@dtelecom/src/room/track/RemoteAudioTrack.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/RemoteTrack.d.ts +15 -0
- package/dist/@dtelecom/src/room/track/RemoteTrack.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/RemoteTrackPublication.d.ts +64 -0
- package/dist/@dtelecom/src/room/track/RemoteTrackPublication.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/RemoteVideoTrack.d.ts +56 -0
- package/dist/@dtelecom/src/room/track/RemoteVideoTrack.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/Track.d.ts +125 -0
- package/dist/@dtelecom/src/room/track/Track.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/TrackPublication.d.ts +72 -0
- package/dist/@dtelecom/src/room/track/TrackPublication.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/create.d.ts +24 -0
- package/dist/@dtelecom/src/room/track/create.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/facingMode.d.ts +41 -0
- package/dist/@dtelecom/src/room/track/facingMode.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/options.d.ts +272 -0
- package/dist/@dtelecom/src/room/track/options.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/processor/types.d.ts +19 -0
- package/dist/@dtelecom/src/room/track/processor/types.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/types.d.ts +24 -0
- package/dist/@dtelecom/src/room/track/types.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/track/utils.d.ts +27 -0
- package/dist/@dtelecom/src/room/track/utils.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/types.d.ts +26 -0
- package/dist/@dtelecom/src/room/types.d.ts.map +1 -0
- package/dist/@dtelecom/src/room/utils.d.ts +92 -0
- package/dist/@dtelecom/src/room/utils.d.ts.map +1 -0
- package/dist/@dtelecom/src/test/MockMediaStreamTrack.d.ts +26 -0
- package/dist/@dtelecom/src/test/MockMediaStreamTrack.d.ts.map +1 -0
- package/dist/@dtelecom/src/test/mocks.d.ts +12 -0
- package/dist/@dtelecom/src/test/mocks.d.ts.map +1 -0
- package/dist/@dtelecom/src/utils/AsyncQueue.d.ts +23 -0
- package/dist/@dtelecom/src/utils/AsyncQueue.d.ts.map +1 -0
- package/dist/@dtelecom/src/utils/browserParser.d.ts +12 -0
- package/dist/@dtelecom/src/utils/browserParser.d.ts.map +1 -0
- package/dist/@dtelecom/src/version.d.ts +3 -0
- package/dist/@dtelecom/src/version.d.ts.map +1 -0
- package/dist/ts4.2/@dtelecom/src/api/SignalClient.d.ts +105 -0
- package/dist/ts4.2/@dtelecom/src/connectionHelper/ConnectionCheck.d.ts +26 -0
- package/dist/ts4.2/@dtelecom/src/connectionHelper/checks/Checker.d.ts +59 -0
- package/dist/ts4.2/@dtelecom/src/connectionHelper/checks/publishAudio.d.ts +6 -0
- package/dist/ts4.2/@dtelecom/src/connectionHelper/checks/publishVideo.d.ts +6 -0
- package/dist/ts4.2/@dtelecom/src/connectionHelper/checks/reconnect.d.ts +6 -0
- package/dist/ts4.2/@dtelecom/src/connectionHelper/checks/turn.d.ts +6 -0
- package/dist/ts4.2/@dtelecom/src/connectionHelper/checks/webrtc.d.ts +6 -0
- package/dist/ts4.2/@dtelecom/src/connectionHelper/checks/websocket.d.ts +6 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/E2eeManager.d.ts +47 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/KeyProvider.d.ts +44 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/constants.d.ts +15 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/errors.d.ts +11 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/index.d.ts +4 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/types.d.ts +130 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/utils.d.ts +24 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/worker/FrameCryptor.d.ts +176 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/worker/ParticipantKeyHandler.d.ts +65 -0
- package/dist/ts4.2/@dtelecom/src/e2ee/worker/e2ee.worker.d.ts +2 -0
- package/dist/ts4.2/@dtelecom/src/index.d.ts +38 -0
- package/dist/ts4.2/@dtelecom/src/logger.d.ts +29 -0
- package/dist/ts4.2/@dtelecom/src/options.d.ts +104 -0
- package/dist/ts4.2/@dtelecom/src/proto/livekit_models_pb.d.ts +1264 -0
- package/dist/ts4.2/@dtelecom/src/proto/livekit_rtc_pb.d.ts +1373 -0
- package/dist/ts4.2/@dtelecom/src/room/DefaultReconnectPolicy.d.ts +8 -0
- package/dist/ts4.2/@dtelecom/src/room/DeviceManager.d.ts +9 -0
- package/dist/ts4.2/@dtelecom/src/room/PCTransport.d.ts +43 -0
- package/dist/ts4.2/@dtelecom/src/room/RTCEngine.d.ts +143 -0
- package/dist/ts4.2/@dtelecom/src/room/ReconnectPolicy.d.ts +24 -0
- package/dist/ts4.2/@dtelecom/src/room/RegionUrlProvider.d.ts +17 -0
- package/dist/ts4.2/@dtelecom/src/room/Room.d.ts +248 -0
- package/dist/ts4.2/@dtelecom/src/room/defaults.d.ts +8 -0
- package/dist/ts4.2/@dtelecom/src/room/errors.d.ts +43 -0
- package/dist/ts4.2/@dtelecom/src/room/events.d.ts +477 -0
- package/dist/ts4.2/@dtelecom/src/room/participant/LocalParticipant.d.ts +177 -0
- package/dist/ts4.2/@dtelecom/src/room/participant/Participant.d.ts +95 -0
- package/dist/ts4.2/@dtelecom/src/room/participant/ParticipantTrackPermission.d.ts +26 -0
- package/dist/ts4.2/@dtelecom/src/room/participant/RemoteParticipant.d.ts +55 -0
- package/dist/ts4.2/@dtelecom/src/room/participant/publishUtils.d.ts +28 -0
- package/dist/ts4.2/@dtelecom/src/room/stats.d.ts +67 -0
- package/dist/ts4.2/@dtelecom/src/room/timers.d.ts +13 -0
- package/dist/ts4.2/@dtelecom/src/room/track/LocalAudioTrack.d.ts +25 -0
- package/dist/ts4.2/@dtelecom/src/room/track/LocalTrack.d.ts +78 -0
- package/dist/ts4.2/@dtelecom/src/room/track/LocalTrackPublication.d.ts +38 -0
- package/dist/ts4.2/@dtelecom/src/room/track/LocalVideoTrack.d.ts +54 -0
- package/dist/ts4.2/@dtelecom/src/room/track/RemoteAudioTrack.d.ts +53 -0
- package/dist/ts4.2/@dtelecom/src/room/track/RemoteTrack.d.ts +15 -0
- package/dist/ts4.2/@dtelecom/src/room/track/RemoteTrackPublication.d.ts +64 -0
- package/dist/ts4.2/@dtelecom/src/room/track/RemoteVideoTrack.d.ts +56 -0
- package/dist/ts4.2/@dtelecom/src/room/track/Track.d.ts +125 -0
- package/dist/ts4.2/@dtelecom/src/room/track/TrackPublication.d.ts +72 -0
- package/dist/ts4.2/@dtelecom/src/room/track/create.d.ts +24 -0
- package/dist/ts4.2/@dtelecom/src/room/track/facingMode.d.ts +41 -0
- package/dist/ts4.2/@dtelecom/src/room/track/options.d.ts +280 -0
- package/dist/ts4.2/@dtelecom/src/room/track/processor/types.d.ts +19 -0
- package/dist/ts4.2/@dtelecom/src/room/track/types.d.ts +24 -0
- package/dist/ts4.2/@dtelecom/src/room/track/utils.d.ts +27 -0
- package/dist/ts4.2/@dtelecom/src/room/types.d.ts +26 -0
- package/dist/ts4.2/@dtelecom/src/room/utils.d.ts +92 -0
- package/dist/ts4.2/@dtelecom/src/test/MockMediaStreamTrack.d.ts +26 -0
- package/dist/ts4.2/@dtelecom/src/test/mocks.d.ts +12 -0
- package/dist/ts4.2/@dtelecom/src/utils/AsyncQueue.d.ts +23 -0
- package/dist/ts4.2/@dtelecom/src/utils/browserParser.d.ts +12 -0
- package/dist/ts4.2/@dtelecom/src/version.d.ts +3 -0
- package/package.json +102 -0
- package/src/api/SignalClient.ts +790 -0
- package/src/connectionHelper/ConnectionCheck.ts +90 -0
- package/src/connectionHelper/checks/Checker.ts +163 -0
- package/src/connectionHelper/checks/publishAudio.ts +33 -0
- package/src/connectionHelper/checks/publishVideo.ts +33 -0
- package/src/connectionHelper/checks/reconnect.ts +45 -0
- package/src/connectionHelper/checks/turn.ts +54 -0
- package/src/connectionHelper/checks/webrtc.ts +82 -0
- package/src/connectionHelper/checks/websocket.ts +27 -0
- package/src/e2ee/E2eeManager.ts +375 -0
- package/src/e2ee/KeyProvider.ts +78 -0
- package/src/e2ee/constants.ts +44 -0
- package/src/e2ee/errors.ts +16 -0
- package/src/e2ee/index.ts +3 -0
- package/src/e2ee/types.ts +161 -0
- package/src/e2ee/utils.ts +127 -0
- package/src/e2ee/worker/FrameCryptor.test.ts +19 -0
- package/src/e2ee/worker/FrameCryptor.ts +612 -0
- package/src/e2ee/worker/ParticipantKeyHandler.ts +175 -0
- package/src/e2ee/worker/e2ee.worker.ts +223 -0
- package/src/e2ee/worker/tsconfig.json +6 -0
- package/src/index.ts +85 -0
- package/src/logger.ts +64 -0
- package/src/options.ts +127 -0
- package/src/proto/livekit_models_pb.ts +2096 -0
- package/src/proto/livekit_rtc_pb.ts +2332 -0
- package/src/room/DefaultReconnectPolicy.ts +35 -0
- package/src/room/DeviceManager.ts +88 -0
- package/src/room/PCTransport.ts +452 -0
- package/src/room/RTCEngine.ts +1421 -0
- package/src/room/ReconnectPolicy.ts +27 -0
- package/src/room/RegionUrlProvider.ts +82 -0
- package/src/room/Room.test.ts +30 -0
- package/src/room/Room.ts +1907 -0
- package/src/room/defaults.ts +49 -0
- package/src/room/errors.ts +90 -0
- package/src/room/events.ts +535 -0
- package/src/room/participant/LocalParticipant.ts +1350 -0
- package/src/room/participant/Participant.ts +299 -0
- package/src/room/participant/ParticipantTrackPermission.ts +42 -0
- package/src/room/participant/RemoteParticipant.ts +359 -0
- package/src/room/participant/publishUtils.test.ts +189 -0
- package/src/room/participant/publishUtils.ts +399 -0
- package/src/room/stats.ts +136 -0
- package/src/room/timers.ts +16 -0
- package/src/room/track/LocalAudioTrack.ts +171 -0
- package/src/room/track/LocalTrack.ts +430 -0
- package/src/room/track/LocalTrackPublication.ts +87 -0
- package/src/room/track/LocalVideoTrack.test.ts +73 -0
- package/src/room/track/LocalVideoTrack.ts +513 -0
- package/src/room/track/RemoteAudioTrack.ts +248 -0
- package/src/room/track/RemoteTrack.ts +62 -0
- package/src/room/track/RemoteTrackPublication.ts +311 -0
- package/src/room/track/RemoteVideoTrack.test.ts +152 -0
- package/src/room/track/RemoteVideoTrack.ts +410 -0
- package/src/room/track/Track.ts +452 -0
- package/src/room/track/TrackPublication.ts +158 -0
- package/src/room/track/create.ts +143 -0
- package/src/room/track/facingMode.test.ts +31 -0
- package/src/room/track/facingMode.ts +103 -0
- package/src/room/track/options.ts +362 -0
- package/src/room/track/processor/types.ts +20 -0
- package/src/room/track/types.ts +25 -0
- package/src/room/track/utils.test.ts +111 -0
- package/src/room/track/utils.ts +183 -0
- package/src/room/types.ts +39 -0
- package/src/room/utils.test.ts +16 -0
- package/src/room/utils.ts +501 -0
- package/src/room/worker.d.ts +4 -0
- package/src/test/MockMediaStreamTrack.ts +84 -0
- package/src/test/mocks.ts +19 -0
- package/src/utils/AsyncQueue.test.ts +100 -0
- package/src/utils/AsyncQueue.ts +57 -0
- package/src/utils/browserParser.test.ts +88 -0
- package/src/utils/browserParser.ts +74 -0
- package/src/version.ts +4 -0
|
@@ -0,0 +1,477 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Events are the primary way LiveKit notifies your application of changes.
|
|
3
|
+
*
|
|
4
|
+
* The following are events emitted by [[Room]], listen to room events like
|
|
5
|
+
*
|
|
6
|
+
* ```typescript
|
|
7
|
+
* room.on(RoomEvent.TrackPublished, (track, publication, participant) => {})
|
|
8
|
+
* ```
|
|
9
|
+
*/
|
|
10
|
+
export declare enum RoomEvent {
|
|
11
|
+
/**
|
|
12
|
+
* When the connection to the server has been established
|
|
13
|
+
*/
|
|
14
|
+
Connected = "connected",
|
|
15
|
+
/**
|
|
16
|
+
* When the connection to the server has been interrupted and it's attempting
|
|
17
|
+
* to reconnect.
|
|
18
|
+
*/
|
|
19
|
+
Reconnecting = "reconnecting",
|
|
20
|
+
/**
|
|
21
|
+
* Fires when a reconnection has been successful.
|
|
22
|
+
*/
|
|
23
|
+
Reconnected = "reconnected",
|
|
24
|
+
/**
|
|
25
|
+
* When disconnected from room. This fires when room.disconnect() is called or
|
|
26
|
+
* when an unrecoverable connection issue had occured
|
|
27
|
+
*/
|
|
28
|
+
Disconnected = "disconnected",
|
|
29
|
+
/**
|
|
30
|
+
* Whenever the connection state of the room changes
|
|
31
|
+
*
|
|
32
|
+
* args: ([[ConnectionState]])
|
|
33
|
+
*/
|
|
34
|
+
ConnectionStateChanged = "connectionStateChanged",
|
|
35
|
+
/**
|
|
36
|
+
* @deprecated StateChanged has been renamed to ConnectionStateChanged
|
|
37
|
+
*/
|
|
38
|
+
StateChanged = "connectionStateChanged",
|
|
39
|
+
/**
|
|
40
|
+
* When input or output devices on the machine have changed.
|
|
41
|
+
*/
|
|
42
|
+
MediaDevicesChanged = "mediaDevicesChanged",
|
|
43
|
+
/**
|
|
44
|
+
* When a [[RemoteParticipant]] joins *after* the local
|
|
45
|
+
* participant. It will not emit events for participants that are already
|
|
46
|
+
* in the room
|
|
47
|
+
*
|
|
48
|
+
* args: ([[RemoteParticipant]])
|
|
49
|
+
*/
|
|
50
|
+
ParticipantConnected = "participantConnected",
|
|
51
|
+
/**
|
|
52
|
+
* When a [[RemoteParticipant]] leaves *after* the local
|
|
53
|
+
* participant has joined.
|
|
54
|
+
*
|
|
55
|
+
* args: ([[RemoteParticipant]])
|
|
56
|
+
*/
|
|
57
|
+
ParticipantDisconnected = "participantDisconnected",
|
|
58
|
+
/**
|
|
59
|
+
* When a new track is published to room *after* the local
|
|
60
|
+
* participant has joined. It will not fire for tracks that are already published.
|
|
61
|
+
*
|
|
62
|
+
* A track published doesn't mean the participant has subscribed to it. It's
|
|
63
|
+
* simply reflecting the state of the room.
|
|
64
|
+
*
|
|
65
|
+
* args: ([[RemoteTrackPublication]], [[RemoteParticipant]])
|
|
66
|
+
*/
|
|
67
|
+
TrackPublished = "trackPublished",
|
|
68
|
+
/**
|
|
69
|
+
* The [[LocalParticipant]] has subscribed to a new track. This event will **always**
|
|
70
|
+
* fire as long as new tracks are ready for use.
|
|
71
|
+
*
|
|
72
|
+
* args: ([[RemoteTrack]], [[RemoteTrackPublication]], [[RemoteParticipant]])
|
|
73
|
+
*/
|
|
74
|
+
TrackSubscribed = "trackSubscribed",
|
|
75
|
+
/**
|
|
76
|
+
* Could not subscribe to a track
|
|
77
|
+
*
|
|
78
|
+
* args: (track sid, [[RemoteParticipant]])
|
|
79
|
+
*/
|
|
80
|
+
TrackSubscriptionFailed = "trackSubscriptionFailed",
|
|
81
|
+
/**
|
|
82
|
+
* A [[RemoteParticipant]] has unpublished a track
|
|
83
|
+
*
|
|
84
|
+
* args: ([[RemoteTrackPublication]], [[RemoteParticipant]])
|
|
85
|
+
*/
|
|
86
|
+
TrackUnpublished = "trackUnpublished",
|
|
87
|
+
/**
|
|
88
|
+
* A subscribed track is no longer available. Clients should listen to this
|
|
89
|
+
* event and ensure they detach tracks.
|
|
90
|
+
*
|
|
91
|
+
* args: ([[Track]], [[RemoteTrackPublication]], [[RemoteParticipant]])
|
|
92
|
+
*/
|
|
93
|
+
TrackUnsubscribed = "trackUnsubscribed",
|
|
94
|
+
/**
|
|
95
|
+
* A track that was muted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
|
|
96
|
+
*
|
|
97
|
+
* args: ([[TrackPublication]], [[Participant]])
|
|
98
|
+
*/
|
|
99
|
+
TrackMuted = "trackMuted",
|
|
100
|
+
/**
|
|
101
|
+
* A track that was unmuted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
|
|
102
|
+
*
|
|
103
|
+
* args: ([[TrackPublication]], [[Participant]])
|
|
104
|
+
*/
|
|
105
|
+
TrackUnmuted = "trackUnmuted",
|
|
106
|
+
/**
|
|
107
|
+
* A local track was published successfully. This event is helpful to know
|
|
108
|
+
* when to update your local UI with the newly published track.
|
|
109
|
+
*
|
|
110
|
+
* args: ([[LocalTrackPublication]], [[LocalParticipant]])
|
|
111
|
+
*/
|
|
112
|
+
LocalTrackPublished = "localTrackPublished",
|
|
113
|
+
/**
|
|
114
|
+
* A local track was unpublished. This event is helpful to know when to remove
|
|
115
|
+
* the local track from your UI.
|
|
116
|
+
*
|
|
117
|
+
* When a user stops sharing their screen by pressing "End" on the browser UI,
|
|
118
|
+
* this event will also fire.
|
|
119
|
+
*
|
|
120
|
+
* args: ([[LocalTrackPublication]], [[LocalParticipant]])
|
|
121
|
+
*/
|
|
122
|
+
LocalTrackUnpublished = "localTrackUnpublished",
|
|
123
|
+
/**
|
|
124
|
+
* When a local audio track is published the SDK checks whether there is complete silence
|
|
125
|
+
* on that track and emits the LocalAudioSilenceDetected event in that case.
|
|
126
|
+
* This allows for applications to show UI informing users that they might have to
|
|
127
|
+
* reset their audio hardware or check for proper device connectivity.
|
|
128
|
+
*/
|
|
129
|
+
LocalAudioSilenceDetected = "localAudioSilenceDetected",
|
|
130
|
+
/**
|
|
131
|
+
* Active speakers changed. List of speakers are ordered by their audio level.
|
|
132
|
+
* loudest speakers first. This will include the LocalParticipant too.
|
|
133
|
+
*
|
|
134
|
+
* Speaker updates are sent only to the publishing participant and their subscribers.
|
|
135
|
+
*
|
|
136
|
+
* args: (Array<[[Participant]]>)
|
|
137
|
+
*/
|
|
138
|
+
ActiveSpeakersChanged = "activeSpeakersChanged",
|
|
139
|
+
/**
|
|
140
|
+
* Participant metadata is a simple way for app-specific state to be pushed to
|
|
141
|
+
* all users.
|
|
142
|
+
* When RoomService.UpdateParticipantMetadata is called to change a participant's
|
|
143
|
+
* state, *all* participants in the room will fire this event.
|
|
144
|
+
*
|
|
145
|
+
* args: (prevMetadata: string, [[Participant]])
|
|
146
|
+
*
|
|
147
|
+
*/
|
|
148
|
+
ParticipantMetadataChanged = "participantMetadataChanged",
|
|
149
|
+
/**
|
|
150
|
+
* Participant's display name changed
|
|
151
|
+
*
|
|
152
|
+
* args: (name: string, [[Participant]])
|
|
153
|
+
*
|
|
154
|
+
*/
|
|
155
|
+
ParticipantNameChanged = "participantNameChanged",
|
|
156
|
+
/**
|
|
157
|
+
* Room metadata is a simple way for app-specific state to be pushed to
|
|
158
|
+
* all users.
|
|
159
|
+
* When RoomService.UpdateRoomMetadata is called to change a room's state,
|
|
160
|
+
* *all* participants in the room will fire this event.
|
|
161
|
+
*
|
|
162
|
+
* args: (string)
|
|
163
|
+
*/
|
|
164
|
+
RoomMetadataChanged = "roomMetadataChanged",
|
|
165
|
+
/**
|
|
166
|
+
* Data received from another participant.
|
|
167
|
+
* Data packets provides the ability to use LiveKit to send/receive arbitrary payloads.
|
|
168
|
+
* All participants in the room will receive the messages sent to the room.
|
|
169
|
+
*
|
|
170
|
+
* args: (payload: Uint8Array, participant: [[Participant]], kind: [[DataPacket_Kind]], topic?: string)
|
|
171
|
+
*/
|
|
172
|
+
DataReceived = "dataReceived",
|
|
173
|
+
/**
|
|
174
|
+
* Connection quality was changed for a Participant. It'll receive updates
|
|
175
|
+
* from the local participant, as well as any [[RemoteParticipant]]s that we are
|
|
176
|
+
* subscribed to.
|
|
177
|
+
*
|
|
178
|
+
* args: (connectionQuality: [[ConnectionQuality]], participant: [[Participant]])
|
|
179
|
+
*/
|
|
180
|
+
ConnectionQualityChanged = "connectionQualityChanged",
|
|
181
|
+
/**
|
|
182
|
+
* StreamState indicates if a subscribed (remote) track has been paused by the SFU
|
|
183
|
+
* (typically this happens because of subscriber's bandwidth constraints)
|
|
184
|
+
*
|
|
185
|
+
* When bandwidth conditions allow, the track will be resumed automatically.
|
|
186
|
+
* TrackStreamStateChanged will also be emitted when that happens.
|
|
187
|
+
*
|
|
188
|
+
* args: (pub: [[RemoteTrackPublication]], streamState: [[Track.StreamState]],
|
|
189
|
+
* participant: [[RemoteParticipant]])
|
|
190
|
+
*/
|
|
191
|
+
TrackStreamStateChanged = "trackStreamStateChanged",
|
|
192
|
+
/**
|
|
193
|
+
* One of subscribed tracks have changed its permissions for the current
|
|
194
|
+
* participant. If permission was revoked, then the track will no longer
|
|
195
|
+
* be subscribed. If permission was granted, a TrackSubscribed event will
|
|
196
|
+
* be emitted.
|
|
197
|
+
*
|
|
198
|
+
* args: (pub: [[RemoteTrackPublication]],
|
|
199
|
+
* status: [[TrackPublication.SubscriptionStatus]],
|
|
200
|
+
* participant: [[RemoteParticipant]])
|
|
201
|
+
*/
|
|
202
|
+
TrackSubscriptionPermissionChanged = "trackSubscriptionPermissionChanged",
|
|
203
|
+
/**
|
|
204
|
+
* One of subscribed tracks have changed its status for the current
|
|
205
|
+
* participant.
|
|
206
|
+
*
|
|
207
|
+
* args: (pub: [[RemoteTrackPublication]],
|
|
208
|
+
* status: [[TrackPublication.SubscriptionStatus]],
|
|
209
|
+
* participant: [[RemoteParticipant]])
|
|
210
|
+
*/
|
|
211
|
+
TrackSubscriptionStatusChanged = "trackSubscriptionStatusChanged",
|
|
212
|
+
/**
|
|
213
|
+
* LiveKit will attempt to autoplay all audio tracks when you attach them to
|
|
214
|
+
* audio elements. However, if that fails, we'll notify you via AudioPlaybackStatusChanged.
|
|
215
|
+
* `Room.canPlayAudio` will indicate if audio playback is permitted.
|
|
216
|
+
*/
|
|
217
|
+
AudioPlaybackStatusChanged = "audioPlaybackChanged",
|
|
218
|
+
/**
|
|
219
|
+
* When we have encountered an error while attempting to create a track.
|
|
220
|
+
* The errors take place in getUserMedia().
|
|
221
|
+
* Use MediaDeviceFailure.getFailure(error) to get the reason of failure.
|
|
222
|
+
* [[LocalParticipant.lastCameraError]] and [[LocalParticipant.lastMicrophoneError]]
|
|
223
|
+
* will indicate if it had an error while creating the audio or video track respectively.
|
|
224
|
+
*
|
|
225
|
+
* args: (error: Error)
|
|
226
|
+
*/
|
|
227
|
+
MediaDevicesError = "mediaDevicesError",
|
|
228
|
+
/**
|
|
229
|
+
* A participant's permission has changed. Currently only fired on LocalParticipant.
|
|
230
|
+
* args: (prevPermissions: [[ParticipantPermission]], participant: [[Participant]])
|
|
231
|
+
*/
|
|
232
|
+
ParticipantPermissionsChanged = "participantPermissionsChanged",
|
|
233
|
+
/**
|
|
234
|
+
* Signal connected, can publish tracks.
|
|
235
|
+
*/
|
|
236
|
+
SignalConnected = "signalConnected",
|
|
237
|
+
/**
|
|
238
|
+
* Recording of a room has started/stopped. Room.isRecording will be updated too.
|
|
239
|
+
* args: (isRecording: boolean)
|
|
240
|
+
*/
|
|
241
|
+
RecordingStatusChanged = "recordingStatusChanged",
|
|
242
|
+
ParticipantEncryptionStatusChanged = "participantEncryptionStatusChanged",
|
|
243
|
+
EncryptionError = "encryptionError",
|
|
244
|
+
/**
|
|
245
|
+
* Emits whenever the current buffer status of a data channel changes
|
|
246
|
+
* args: (isLow: boolean, kind: [[DataPacket_Kind]])
|
|
247
|
+
*/
|
|
248
|
+
DCBufferStatusChanged = "dcBufferStatusChanged",
|
|
249
|
+
/**
|
|
250
|
+
* Triggered by a call to room.switchActiveDevice
|
|
251
|
+
* args: (kind: MediaDeviceKind, deviceId: string)
|
|
252
|
+
*/
|
|
253
|
+
ActiveDeviceChanged = "activeDeviceChanged"
|
|
254
|
+
}
|
|
255
|
+
export declare enum ParticipantEvent {
|
|
256
|
+
/**
|
|
257
|
+
* When a new track is published to room *after* the local
|
|
258
|
+
* participant has joined. It will not fire for tracks that are already published.
|
|
259
|
+
*
|
|
260
|
+
* A track published doesn't mean the participant has subscribed to it. It's
|
|
261
|
+
* simply reflecting the state of the room.
|
|
262
|
+
*
|
|
263
|
+
* args: ([[RemoteTrackPublication]])
|
|
264
|
+
*/
|
|
265
|
+
TrackPublished = "trackPublished",
|
|
266
|
+
/**
|
|
267
|
+
* Successfully subscribed to the [[RemoteParticipant]]'s track.
|
|
268
|
+
* This event will **always** fire as long as new tracks are ready for use.
|
|
269
|
+
*
|
|
270
|
+
* args: ([[RemoteTrack]], [[RemoteTrackPublication]])
|
|
271
|
+
*/
|
|
272
|
+
TrackSubscribed = "trackSubscribed",
|
|
273
|
+
/**
|
|
274
|
+
* Could not subscribe to a track
|
|
275
|
+
*
|
|
276
|
+
* args: (track sid)
|
|
277
|
+
*/
|
|
278
|
+
TrackSubscriptionFailed = "trackSubscriptionFailed",
|
|
279
|
+
/**
|
|
280
|
+
* A [[RemoteParticipant]] has unpublished a track
|
|
281
|
+
*
|
|
282
|
+
* args: ([[RemoteTrackPublication]])
|
|
283
|
+
*/
|
|
284
|
+
TrackUnpublished = "trackUnpublished",
|
|
285
|
+
/**
|
|
286
|
+
* A subscribed track is no longer available. Clients should listen to this
|
|
287
|
+
* event and ensure they detach tracks.
|
|
288
|
+
*
|
|
289
|
+
* args: ([[RemoteTrack]], [[RemoteTrackPublication]])
|
|
290
|
+
*/
|
|
291
|
+
TrackUnsubscribed = "trackUnsubscribed",
|
|
292
|
+
/**
|
|
293
|
+
* A track that was muted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
|
|
294
|
+
*
|
|
295
|
+
* args: ([[TrackPublication]])
|
|
296
|
+
*/
|
|
297
|
+
TrackMuted = "trackMuted",
|
|
298
|
+
/**
|
|
299
|
+
* A track that was unmuted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
|
|
300
|
+
*
|
|
301
|
+
* args: ([[TrackPublication]])
|
|
302
|
+
*/
|
|
303
|
+
TrackUnmuted = "trackUnmuted",
|
|
304
|
+
/**
|
|
305
|
+
* A local track was published successfully. This event is helpful to know
|
|
306
|
+
* when to update your local UI with the newly published track.
|
|
307
|
+
*
|
|
308
|
+
* args: ([[LocalTrackPublication]])
|
|
309
|
+
*/
|
|
310
|
+
LocalTrackPublished = "localTrackPublished",
|
|
311
|
+
/**
|
|
312
|
+
* A local track was unpublished. This event is helpful to know when to remove
|
|
313
|
+
* the local track from your UI.
|
|
314
|
+
*
|
|
315
|
+
* When a user stops sharing their screen by pressing "End" on the browser UI,
|
|
316
|
+
* this event will also fire.
|
|
317
|
+
*
|
|
318
|
+
* args: ([[LocalTrackPublication]])
|
|
319
|
+
*/
|
|
320
|
+
LocalTrackUnpublished = "localTrackUnpublished",
|
|
321
|
+
/**
|
|
322
|
+
* Participant metadata is a simple way for app-specific state to be pushed to
|
|
323
|
+
* all users.
|
|
324
|
+
* When RoomService.UpdateParticipantMetadata is called to change a participant's
|
|
325
|
+
* state, *all* participants in the room will fire this event.
|
|
326
|
+
* To access the current metadata, see [[Participant.metadata]].
|
|
327
|
+
*
|
|
328
|
+
* args: (prevMetadata: string)
|
|
329
|
+
*
|
|
330
|
+
*/
|
|
331
|
+
ParticipantMetadataChanged = "participantMetadataChanged",
|
|
332
|
+
/**
|
|
333
|
+
* Participant's display name changed
|
|
334
|
+
*
|
|
335
|
+
* args: (name: string, [[Participant]])
|
|
336
|
+
*
|
|
337
|
+
*/
|
|
338
|
+
ParticipantNameChanged = "participantNameChanged",
|
|
339
|
+
/**
|
|
340
|
+
* Data received from this participant as sender.
|
|
341
|
+
* Data packets provides the ability to use LiveKit to send/receive arbitrary payloads.
|
|
342
|
+
* All participants in the room will receive the messages sent to the room.
|
|
343
|
+
*
|
|
344
|
+
* args: (payload: Uint8Array, kind: [[DataPacket_Kind]])
|
|
345
|
+
*/
|
|
346
|
+
DataReceived = "dataReceived",
|
|
347
|
+
/**
|
|
348
|
+
* Has speaking status changed for the current participant
|
|
349
|
+
*
|
|
350
|
+
* args: (speaking: boolean)
|
|
351
|
+
*/
|
|
352
|
+
IsSpeakingChanged = "isSpeakingChanged",
|
|
353
|
+
/**
|
|
354
|
+
* Connection quality was changed for a Participant. It'll receive updates
|
|
355
|
+
* from the local participant, as well as any [[RemoteParticipant]]s that we are
|
|
356
|
+
* subscribed to.
|
|
357
|
+
*
|
|
358
|
+
* args: (connectionQuality: [[ConnectionQuality]])
|
|
359
|
+
*/
|
|
360
|
+
ConnectionQualityChanged = "connectionQualityChanged",
|
|
361
|
+
/**
|
|
362
|
+
* StreamState indicates if a subscribed track has been paused by the SFU
|
|
363
|
+
* (typically this happens because of subscriber's bandwidth constraints)
|
|
364
|
+
*
|
|
365
|
+
* When bandwidth conditions allow, the track will be resumed automatically.
|
|
366
|
+
* TrackStreamStateChanged will also be emitted when that happens.
|
|
367
|
+
*
|
|
368
|
+
* args: (pub: [[RemoteTrackPublication]], streamState: [[Track.StreamState]])
|
|
369
|
+
*/
|
|
370
|
+
TrackStreamStateChanged = "trackStreamStateChanged",
|
|
371
|
+
/**
|
|
372
|
+
* One of subscribed tracks have changed its permissions for the current
|
|
373
|
+
* participant. If permission was revoked, then the track will no longer
|
|
374
|
+
* be subscribed. If permission was granted, a TrackSubscribed event will
|
|
375
|
+
* be emitted.
|
|
376
|
+
*
|
|
377
|
+
* args: (pub: [[RemoteTrackPublication]],
|
|
378
|
+
* status: [[TrackPublication.SubscriptionStatus]])
|
|
379
|
+
*/
|
|
380
|
+
TrackSubscriptionPermissionChanged = "trackSubscriptionPermissionChanged",
|
|
381
|
+
/**
|
|
382
|
+
* One of the remote participants publications has changed its subscription status.
|
|
383
|
+
*
|
|
384
|
+
*/
|
|
385
|
+
TrackSubscriptionStatusChanged = "trackSubscriptionStatusChanged",
|
|
386
|
+
/** @internal */
|
|
387
|
+
MediaDevicesError = "mediaDevicesError",
|
|
388
|
+
/**
|
|
389
|
+
* A participant's permission has changed. Currently only fired on LocalParticipant.
|
|
390
|
+
* args: (prevPermissions: [[ParticipantPermission]])
|
|
391
|
+
*/
|
|
392
|
+
ParticipantPermissionsChanged = "participantPermissionsChanged",
|
|
393
|
+
/** @internal */
|
|
394
|
+
PCTrackAdded = "pcTrackAdded"
|
|
395
|
+
}
|
|
396
|
+
/** @internal */
|
|
397
|
+
export declare enum EngineEvent {
|
|
398
|
+
TransportsCreated = "transportsCreated",
|
|
399
|
+
Connected = "connected",
|
|
400
|
+
Disconnected = "disconnected",
|
|
401
|
+
Resuming = "resuming",
|
|
402
|
+
Resumed = "resumed",
|
|
403
|
+
Restarting = "restarting",
|
|
404
|
+
Restarted = "restarted",
|
|
405
|
+
SignalResumed = "signalResumed",
|
|
406
|
+
SignalRestarted = "signalRestarted",
|
|
407
|
+
Closing = "closing",
|
|
408
|
+
MediaTrackAdded = "mediaTrackAdded",
|
|
409
|
+
ActiveSpeakersUpdate = "activeSpeakersUpdate",
|
|
410
|
+
DataPacketReceived = "dataPacketReceived",
|
|
411
|
+
RTPVideoMapUpdate = "rtpVideoMapUpdate",
|
|
412
|
+
DCBufferStatusChanged = "dcBufferStatusChanged",
|
|
413
|
+
ParticipantUpdate = "participantUpdate",
|
|
414
|
+
RoomUpdate = "roomUpdate",
|
|
415
|
+
SpeakersChanged = "speakersChanged",
|
|
416
|
+
StreamStateChanged = "streamStateChanged",
|
|
417
|
+
ConnectionQualityUpdate = "connectionQualityUpdate",
|
|
418
|
+
SubscriptionError = "subscriptionError",
|
|
419
|
+
SubscriptionPermissionUpdate = "subscriptionPermissionUpdate"
|
|
420
|
+
}
|
|
421
|
+
export declare enum TrackEvent {
|
|
422
|
+
Message = "message",
|
|
423
|
+
Muted = "muted",
|
|
424
|
+
Unmuted = "unmuted",
|
|
425
|
+
/**
|
|
426
|
+
* Only fires on LocalTracks
|
|
427
|
+
*/
|
|
428
|
+
Restarted = "restarted",
|
|
429
|
+
Ended = "ended",
|
|
430
|
+
Subscribed = "subscribed",
|
|
431
|
+
Unsubscribed = "unsubscribed",
|
|
432
|
+
/** @internal */
|
|
433
|
+
UpdateSettings = "updateSettings",
|
|
434
|
+
/** @internal */
|
|
435
|
+
UpdateSubscription = "updateSubscription",
|
|
436
|
+
/** @internal */
|
|
437
|
+
AudioPlaybackStarted = "audioPlaybackStarted",
|
|
438
|
+
/** @internal */
|
|
439
|
+
AudioPlaybackFailed = "audioPlaybackFailed",
|
|
440
|
+
/**
|
|
441
|
+
* @internal
|
|
442
|
+
* Only fires on LocalAudioTrack instances
|
|
443
|
+
*/
|
|
444
|
+
AudioSilenceDetected = "audioSilenceDetected",
|
|
445
|
+
/** @internal */
|
|
446
|
+
VisibilityChanged = "visibilityChanged",
|
|
447
|
+
/** @internal */
|
|
448
|
+
VideoDimensionsChanged = "videoDimensionsChanged",
|
|
449
|
+
/** @internal */
|
|
450
|
+
ElementAttached = "elementAttached",
|
|
451
|
+
/** @internal */
|
|
452
|
+
ElementDetached = "elementDetached",
|
|
453
|
+
/**
|
|
454
|
+
* @internal
|
|
455
|
+
* Only fires on LocalTracks
|
|
456
|
+
*/
|
|
457
|
+
UpstreamPaused = "upstreamPaused",
|
|
458
|
+
/**
|
|
459
|
+
* @internal
|
|
460
|
+
* Only fires on LocalTracks
|
|
461
|
+
*/
|
|
462
|
+
UpstreamResumed = "upstreamResumed",
|
|
463
|
+
/**
|
|
464
|
+
* @internal
|
|
465
|
+
* Fires on RemoteTrackPublication
|
|
466
|
+
*/
|
|
467
|
+
SubscriptionPermissionChanged = "subscriptionPermissionChanged",
|
|
468
|
+
/**
|
|
469
|
+
* Fires on RemoteTrackPublication
|
|
470
|
+
*/
|
|
471
|
+
SubscriptionStatusChanged = "subscriptionStatusChanged",
|
|
472
|
+
/**
|
|
473
|
+
* Fires on RemoteTrackPublication
|
|
474
|
+
*/
|
|
475
|
+
SubscriptionFailed = "subscriptionFailed"
|
|
476
|
+
}
|
|
477
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import type { InternalRoomOptions } from '../../options';
|
|
2
|
+
import { DataPacket_Kind, ParticipantInfo, ParticipantPermission } from '../../proto/livekit_models_pb';
|
|
3
|
+
import { DataChannelInfo, TrackPublishedResponse } from '../../proto/livekit_rtc_pb';
|
|
4
|
+
import type RTCEngine from '../RTCEngine';
|
|
5
|
+
import LocalTrack from '../track/LocalTrack';
|
|
6
|
+
import LocalTrackPublication from '../track/LocalTrackPublication';
|
|
7
|
+
import { Track } from '../track/Track';
|
|
8
|
+
import type { AudioCaptureOptions, BackupVideoCodec, CreateLocalTracksOptions, ScreenShareCaptureOptions, TrackPublishOptions, VideoCaptureOptions } from '../track/options';
|
|
9
|
+
import type { DataPublishOptions } from '../types';
|
|
10
|
+
import Participant from './Participant';
|
|
11
|
+
import type { ParticipantTrackPermission } from './ParticipantTrackPermission';
|
|
12
|
+
import RemoteParticipant from './RemoteParticipant';
|
|
13
|
+
export default class LocalParticipant extends Participant {
|
|
14
|
+
audioTracks: Map<string, LocalTrackPublication>;
|
|
15
|
+
videoTracks: Map<string, LocalTrackPublication>;
|
|
16
|
+
/** map of track sid => all published tracks */
|
|
17
|
+
tracks: Map<string, LocalTrackPublication>;
|
|
18
|
+
/** @internal */
|
|
19
|
+
engine: RTCEngine;
|
|
20
|
+
/** @internal */
|
|
21
|
+
activeDeviceMap: Map<MediaDeviceKind, string>;
|
|
22
|
+
private pendingPublishing;
|
|
23
|
+
private pendingPublishPromises;
|
|
24
|
+
private cameraError;
|
|
25
|
+
private microphoneError;
|
|
26
|
+
private participantTrackPermissions;
|
|
27
|
+
private allParticipantsAllowedToSubscribe;
|
|
28
|
+
private roomOptions;
|
|
29
|
+
private encryptionType;
|
|
30
|
+
private reconnectFuture?;
|
|
31
|
+
/** @internal */
|
|
32
|
+
constructor(sid: string, identity: string, engine: RTCEngine, options: InternalRoomOptions);
|
|
33
|
+
get lastCameraError(): Error | undefined;
|
|
34
|
+
get lastMicrophoneError(): Error | undefined;
|
|
35
|
+
getTrack(source: Track.Source): LocalTrackPublication | undefined;
|
|
36
|
+
getTrackByName(name: string): LocalTrackPublication | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* @internal
|
|
39
|
+
*/
|
|
40
|
+
setupEngine(engine: RTCEngine): void;
|
|
41
|
+
private handleReconnecting;
|
|
42
|
+
private handleReconnected;
|
|
43
|
+
private handleDisconnected;
|
|
44
|
+
/**
|
|
45
|
+
* Sets and updates the metadata of the local participant.
|
|
46
|
+
* Note: this requires `canUpdateOwnMetadata` permission encoded in the token.
|
|
47
|
+
* @param metadata
|
|
48
|
+
*/
|
|
49
|
+
setMetadata(metadata: string): void;
|
|
50
|
+
/**
|
|
51
|
+
* Sets and updates the name of the local participant.
|
|
52
|
+
* Note: this requires `canUpdateOwnMetadata` permission encoded in the token.
|
|
53
|
+
* @param metadata
|
|
54
|
+
*/
|
|
55
|
+
setName(name: string): void;
|
|
56
|
+
/**
|
|
57
|
+
* Enable or disable a participant's camera track.
|
|
58
|
+
*
|
|
59
|
+
* If a track has already published, it'll mute or unmute the track.
|
|
60
|
+
* Resolves with a `LocalTrackPublication` instance if successful and `undefined` otherwise
|
|
61
|
+
*/
|
|
62
|
+
setCameraEnabled(enabled: boolean, options?: VideoCaptureOptions, publishOptions?: TrackPublishOptions): Promise<LocalTrackPublication | undefined>;
|
|
63
|
+
/**
|
|
64
|
+
* Enable or disable a participant's microphone track.
|
|
65
|
+
*
|
|
66
|
+
* If a track has already published, it'll mute or unmute the track.
|
|
67
|
+
* Resolves with a `LocalTrackPublication` instance if successful and `undefined` otherwise
|
|
68
|
+
*/
|
|
69
|
+
setMicrophoneEnabled(enabled: boolean, options?: AudioCaptureOptions, publishOptions?: TrackPublishOptions): Promise<LocalTrackPublication | undefined>;
|
|
70
|
+
/**
|
|
71
|
+
* Start or stop sharing a participant's screen
|
|
72
|
+
* Resolves with a `LocalTrackPublication` instance if successful and `undefined` otherwise
|
|
73
|
+
*/
|
|
74
|
+
setScreenShareEnabled(enabled: boolean, options?: ScreenShareCaptureOptions, publishOptions?: TrackPublishOptions): Promise<LocalTrackPublication | undefined>;
|
|
75
|
+
/** @internal */
|
|
76
|
+
setPermissions(permissions: ParticipantPermission): boolean;
|
|
77
|
+
/** @internal */
|
|
78
|
+
setE2EEEnabled(enabled: boolean): Promise<void>;
|
|
79
|
+
/**
|
|
80
|
+
* Enable or disable publishing for a track by source. This serves as a simple
|
|
81
|
+
* way to manage the common tracks (camera, mic, or screen share).
|
|
82
|
+
* Resolves with LocalTrackPublication if successful and void otherwise
|
|
83
|
+
*/
|
|
84
|
+
private setTrackEnabled;
|
|
85
|
+
/**
|
|
86
|
+
* Publish both camera and microphone at the same time. This is useful for
|
|
87
|
+
* displaying a single Permission Dialog box to the end user.
|
|
88
|
+
*/
|
|
89
|
+
enableCameraAndMicrophone(): Promise<void>;
|
|
90
|
+
/**
|
|
91
|
+
* Create local camera and/or microphone tracks
|
|
92
|
+
* @param options
|
|
93
|
+
* @returns
|
|
94
|
+
*/
|
|
95
|
+
createTracks(options?: CreateLocalTracksOptions): Promise<LocalTrack[]>;
|
|
96
|
+
/**
|
|
97
|
+
* Creates a screen capture tracks with getDisplayMedia().
|
|
98
|
+
* A LocalVideoTrack is always created and returned.
|
|
99
|
+
* If { audio: true }, and the browser supports audio capture, a LocalAudioTrack is also created.
|
|
100
|
+
*/
|
|
101
|
+
createScreenTracks(options?: ScreenShareCaptureOptions): Promise<Array<LocalTrack>>;
|
|
102
|
+
/**
|
|
103
|
+
* Publish a new track to the room
|
|
104
|
+
* @param track
|
|
105
|
+
* @param options
|
|
106
|
+
*/
|
|
107
|
+
publishTrack(track: LocalTrack | MediaStreamTrack, options?: TrackPublishOptions): Promise<LocalTrackPublication>;
|
|
108
|
+
private publish;
|
|
109
|
+
get isLocal(): boolean;
|
|
110
|
+
/** @internal
|
|
111
|
+
* publish additional codec to existing track
|
|
112
|
+
*/
|
|
113
|
+
publishAdditionalCodecForTrack(track: LocalTrack | MediaStreamTrack, videoCodec: BackupVideoCodec, options?: TrackPublishOptions): Promise<void>;
|
|
114
|
+
unpublishTrack(track: LocalTrack | MediaStreamTrack, stopOnUnpublish?: boolean): Promise<LocalTrackPublication | undefined>;
|
|
115
|
+
unpublishTracks(tracks: LocalTrack[] | MediaStreamTrack[]): Promise<LocalTrackPublication[]>;
|
|
116
|
+
republishAllTracks(options?: TrackPublishOptions, restartTracks?: boolean): Promise<void>;
|
|
117
|
+
/**
|
|
118
|
+
* Publish a new data payload to the room. Data will be forwarded to each
|
|
119
|
+
* participant in the room if the destination field in publishOptions is empty
|
|
120
|
+
*
|
|
121
|
+
* @param data Uint8Array of the payload. To send string data, use TextEncoder.encode
|
|
122
|
+
* @param kind whether to send this as reliable or lossy.
|
|
123
|
+
* For data that you need delivery guarantee (such as chat messages), use Reliable.
|
|
124
|
+
* For data that should arrive as quickly as possible, but you are ok with dropped
|
|
125
|
+
* packets, use Lossy.
|
|
126
|
+
* @param publishOptions optionally specify a `topic` and `destination`
|
|
127
|
+
*/
|
|
128
|
+
publishData(data: Uint8Array, kind: DataPacket_Kind, publishOptions?: DataPublishOptions): Promise<void>;
|
|
129
|
+
/**
|
|
130
|
+
* Publish a new data payload to the room. Data will be forwarded to each
|
|
131
|
+
* participant in the room if the destination argument is empty
|
|
132
|
+
*
|
|
133
|
+
* @param data Uint8Array of the payload. To send string data, use TextEncoder.encode
|
|
134
|
+
* @param kind whether to send this as reliable or lossy.
|
|
135
|
+
* For data that you need delivery guarantee (such as chat messages), use Reliable.
|
|
136
|
+
* For data that should arrive as quickly as possible, but you are ok with dropped
|
|
137
|
+
* packets, use Lossy.
|
|
138
|
+
* @param destination the participants who will receive the message
|
|
139
|
+
*/
|
|
140
|
+
publishData(data: Uint8Array, kind: DataPacket_Kind, destination?: RemoteParticipant[] | string[]): Promise<void>;
|
|
141
|
+
/**
|
|
142
|
+
* Control who can subscribe to LocalParticipant's published tracks.
|
|
143
|
+
*
|
|
144
|
+
* By default, all participants can subscribe. This allows fine-grained control over
|
|
145
|
+
* who is able to subscribe at a participant and track level.
|
|
146
|
+
*
|
|
147
|
+
* Note: if access is given at a track-level (i.e. both [allParticipantsAllowed] and
|
|
148
|
+
* [ParticipantTrackPermission.allTracksAllowed] are false), any newer published tracks
|
|
149
|
+
* will not grant permissions to any participants and will require a subsequent
|
|
150
|
+
* permissions update to allow subscription.
|
|
151
|
+
*
|
|
152
|
+
* @param allParticipantsAllowed Allows all participants to subscribe all tracks.
|
|
153
|
+
* Takes precedence over [[participantTrackPermissions]] if set to true.
|
|
154
|
+
* By default this is set to true.
|
|
155
|
+
* @param participantTrackPermissions Full list of individual permissions per
|
|
156
|
+
* participant/track. Any omitted participants will not receive any permissions.
|
|
157
|
+
*/
|
|
158
|
+
setTrackSubscriptionPermissions(allParticipantsAllowed: boolean, participantTrackPermissions?: ParticipantTrackPermission[]): void;
|
|
159
|
+
/** @internal */
|
|
160
|
+
updateInfo(info: ParticipantInfo): boolean;
|
|
161
|
+
private updateTrackSubscriptionPermissions;
|
|
162
|
+
/** @internal */
|
|
163
|
+
private onTrackUnmuted;
|
|
164
|
+
/** @internal */
|
|
165
|
+
private onTrackMuted;
|
|
166
|
+
private onTrackUpstreamPaused;
|
|
167
|
+
private onTrackUpstreamResumed;
|
|
168
|
+
private handleSubscribedQualityUpdate;
|
|
169
|
+
private handleLocalTrackUnpublished;
|
|
170
|
+
private handleTrackEnded;
|
|
171
|
+
private getPublicationForTrack;
|
|
172
|
+
/** @internal */
|
|
173
|
+
publishedTracksInfo(): TrackPublishedResponse[];
|
|
174
|
+
/** @internal */
|
|
175
|
+
dataChannelsInfo(): DataChannelInfo[];
|
|
176
|
+
}
|
|
177
|
+
//# sourceMappingURL=LocalParticipant.d.ts.map
|