livekit-client 2.22.3 → 2.22.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -0
- package/dist/livekit-client.e2ee.worker.js +1 -1
- package/dist/livekit-client.e2ee.worker.js.map +1 -1
- package/dist/livekit-client.e2ee.worker.mjs +2 -1
- package/dist/livekit-client.e2ee.worker.mjs.map +1 -1
- package/dist/livekit-client.esm.mjs +602 -247
- package/dist/livekit-client.esm.mjs.map +1 -1
- package/dist/livekit-client.fm.worker.js +1 -1
- package/dist/livekit-client.fm.worker.js.map +1 -1
- package/dist/livekit-client.fm.worker.mjs +2 -1
- package/dist/livekit-client.fm.worker.mjs.map +1 -1
- package/dist/livekit-client.umd.js +1 -1
- package/dist/livekit-client.umd.js.map +1 -1
- package/dist/src/api/SignalClient.d.ts +4 -2
- package/dist/src/api/SignalClient.d.ts.map +1 -1
- package/dist/src/options.d.ts +14 -0
- package/dist/src/options.d.ts.map +1 -1
- package/dist/src/room/PCTransport.d.ts +78 -7
- package/dist/src/room/PCTransport.d.ts.map +1 -1
- package/dist/src/room/PCTransportManager.d.ts.map +1 -1
- package/dist/src/room/RTCEngine.d.ts +8 -0
- package/dist/src/room/RTCEngine.d.ts.map +1 -1
- package/dist/src/room/Room.d.ts +1 -1
- package/dist/src/room/Room.d.ts.map +1 -1
- package/dist/src/room/defaults.d.ts.map +1 -1
- package/dist/src/room/errors.d.ts +18 -0
- package/dist/src/room/errors.d.ts.map +1 -1
- package/dist/src/room/events.d.ts +3 -2
- package/dist/src/room/events.d.ts.map +1 -1
- package/dist/src/room/participant/publishUtils.d.ts.map +1 -1
- package/dist/src/room/rpc/client/RpcClientManager.d.ts.map +1 -1
- package/dist/src/room/track/LocalTrack.d.ts.map +1 -1
- package/dist/src/room/track/LocalVideoTrack.d.ts +2 -0
- package/dist/src/room/track/LocalVideoTrack.d.ts.map +1 -1
- package/dist/src/room/track/utils.d.ts +13 -0
- package/dist/src/room/track/utils.d.ts.map +1 -1
- package/dist/src/room/utils.d.ts +32 -0
- package/dist/src/room/utils.d.ts.map +1 -1
- package/dist/src/test/compressionStreamStubs.d.ts +12 -0
- package/dist/src/test/compressionStreamStubs.d.ts.map +1 -0
- package/dist/ts4.2/api/SignalClient.d.ts +187 -185
- package/dist/ts4.2/api/SignalClientStateMachine.d.ts +85 -85
- package/dist/ts4.2/api/WebSocketStream.d.ts +33 -33
- package/dist/ts4.2/api/utils.d.ts +9 -9
- package/dist/ts4.2/connectionHelper/ConnectionCheck.d.ts +30 -30
- package/dist/ts4.2/connectionHelper/checks/Checker.d.ts +62 -62
- package/dist/ts4.2/connectionHelper/checks/cloudRegion.d.ts +18 -18
- package/dist/ts4.2/connectionHelper/checks/connectionProtocol.d.ts +20 -20
- package/dist/ts4.2/connectionHelper/checks/publishAudio.d.ts +6 -6
- package/dist/ts4.2/connectionHelper/checks/publishVideo.d.ts +7 -7
- package/dist/ts4.2/connectionHelper/checks/reconnect.d.ts +6 -6
- package/dist/ts4.2/connectionHelper/checks/turn.d.ts +6 -6
- package/dist/ts4.2/connectionHelper/checks/webrtc.d.ts +6 -6
- package/dist/ts4.2/connectionHelper/checks/websocket.d.ts +6 -6
- package/dist/ts4.2/e2ee/E2eeManager.d.ts +111 -111
- package/dist/ts4.2/e2ee/KeyProvider.d.ts +54 -54
- package/dist/ts4.2/e2ee/constants.d.ts +21 -21
- package/dist/ts4.2/e2ee/errors.d.ts +12 -12
- package/dist/ts4.2/e2ee/events.d.ts +39 -39
- package/dist/ts4.2/e2ee/index.d.ts +6 -6
- package/dist/ts4.2/e2ee/types.d.ts +231 -231
- package/dist/ts4.2/e2ee/utils.d.ts +32 -32
- package/dist/ts4.2/e2ee/worker/DataCryptor.d.ts +16 -16
- package/dist/ts4.2/e2ee/worker/ErrorRateLimiter.d.ts +21 -21
- package/dist/ts4.2/e2ee/worker/FrameCryptor.d.ts +209 -209
- package/dist/ts4.2/e2ee/worker/ParticipantKeyHandler.d.ts +81 -84
- package/dist/ts4.2/e2ee/worker/e2ee.worker.d.ts +2 -2
- package/dist/ts4.2/e2ee/worker/naluUtils.d.ts +28 -28
- package/dist/ts4.2/e2ee/worker/sifPayload.d.ts +23 -23
- package/dist/ts4.2/frameMetadata/FrameMetadataManager.d.ts +53 -53
- package/dist/ts4.2/frameMetadata/frameMetadata.d.ts +33 -33
- package/dist/ts4.2/frameMetadata/types.d.ts +62 -62
- package/dist/ts4.2/frameMetadata/utils.d.ts +9 -9
- package/dist/ts4.2/frameMetadata/worker/frameMetadata.worker.d.ts +2 -2
- package/dist/ts4.2/index.d.ts +76 -76
- package/dist/ts4.2/logger.d.ts +66 -66
- package/dist/ts4.2/options.d.ts +163 -149
- package/dist/ts4.2/room/BackOffStrategy.d.ts +27 -27
- package/dist/ts4.2/room/DefaultReconnectPolicy.d.ts +8 -8
- package/dist/ts4.2/room/DeviceManager.d.ts +12 -12
- package/dist/ts4.2/room/PCTransport.d.ts +246 -175
- package/dist/ts4.2/room/PCTransportManager.d.ts +77 -77
- package/dist/ts4.2/room/RTCEngine.d.ts +269 -262
- package/dist/ts4.2/room/ReconnectPolicy.d.ts +24 -24
- package/dist/ts4.2/room/RegionUrlProvider.d.ts +36 -36
- package/dist/ts4.2/room/Room.d.ts +354 -365
- package/dist/ts4.2/room/attribute-typings.d.ts +35 -35
- package/dist/ts4.2/room/data-channel/DataChannelManager.d.ts +62 -62
- package/dist/ts4.2/room/data-channel/FlowControlledDataChannel.d.ts +94 -95
- package/dist/ts4.2/room/data-channel/LossyDataChannel.d.ts +41 -41
- package/dist/ts4.2/room/data-channel/ReliableDataChannel.d.ts +57 -57
- package/dist/ts4.2/room/data-channel/types.d.ts +12 -12
- package/dist/ts4.2/room/data-stream/compression.d.ts +49 -49
- package/dist/ts4.2/room/data-stream/constants.d.ts +18 -18
- package/dist/ts4.2/room/data-stream/incoming/IncomingDataStreamManager.d.ts +29 -29
- package/dist/ts4.2/room/data-stream/incoming/StreamReader.d.ts +80 -80
- package/dist/ts4.2/room/data-stream/outgoing/OutgoingDataStreamManager.d.ts +73 -73
- package/dist/ts4.2/room/data-stream/outgoing/StreamWriter.d.ts +16 -16
- package/dist/ts4.2/room/data-stream/outgoing/header-utils.d.ts +18 -18
- package/dist/ts4.2/room/data-track/LocalDataTrack.d.ts +79 -80
- package/dist/ts4.2/room/data-track/RemoteDataTrack.d.ts +50 -50
- package/dist/ts4.2/room/data-track/depacketizer.d.ts +59 -59
- package/dist/ts4.2/room/data-track/frame.d.ts +22 -22
- package/dist/ts4.2/room/data-track/handle.d.ts +27 -27
- package/dist/ts4.2/room/data-track/incoming/IncomingDataTrackManager.d.ts +124 -124
- package/dist/ts4.2/room/data-track/incoming/errors.d.ts +24 -24
- package/dist/ts4.2/room/data-track/incoming/pipeline.d.ts +41 -41
- package/dist/ts4.2/room/data-track/incoming/types.d.ts +20 -20
- package/dist/ts4.2/room/data-track/outgoing/OutgoingDataTrackManager.d.ts +126 -126
- package/dist/ts4.2/room/data-track/outgoing/errors.d.ts +74 -74
- package/dist/ts4.2/room/data-track/outgoing/pipeline.d.ts +23 -23
- package/dist/ts4.2/room/data-track/outgoing/types.d.ts +48 -48
- package/dist/ts4.2/room/data-track/packet/constants.d.ts +20 -20
- package/dist/ts4.2/room/data-track/packet/errors.d.ts +40 -40
- package/dist/ts4.2/room/data-track/packet/extensions.d.ts +69 -69
- package/dist/ts4.2/room/data-track/packet/index.d.ts +98 -98
- package/dist/ts4.2/room/data-track/packet/serializable.d.ts +13 -13
- package/dist/ts4.2/room/data-track/packetizer.d.ts +43 -43
- package/dist/ts4.2/room/data-track/track-interfaces.d.ts +23 -23
- package/dist/ts4.2/room/data-track/types.d.ts +22 -22
- package/dist/ts4.2/room/data-track/utils.d.ts +60 -60
- package/dist/ts4.2/room/debounce.d.ts +11 -11
- package/dist/ts4.2/room/defaults.d.ts +9 -9
- package/dist/ts4.2/room/errors.d.ts +180 -162
- package/dist/ts4.2/room/events.d.ts +638 -637
- package/dist/ts4.2/room/participant/LocalParticipant.d.ts +287 -287
- package/dist/ts4.2/room/participant/Participant.d.ts +142 -144
- package/dist/ts4.2/room/participant/ParticipantTrackPermission.d.ts +26 -26
- package/dist/ts4.2/room/participant/RemoteParticipant.d.ts +85 -86
- package/dist/ts4.2/room/participant/publishUtils.d.ts +53 -53
- package/dist/ts4.2/room/rpc/client/RpcClientManager.d.ts +43 -43
- package/dist/ts4.2/room/rpc/client/events.d.ts +8 -8
- package/dist/ts4.2/room/rpc/index.d.ts +7 -7
- package/dist/ts4.2/room/rpc/server/RpcServerManager.d.ts +44 -44
- package/dist/ts4.2/room/rpc/server/events.d.ts +8 -8
- package/dist/ts4.2/room/rpc/utils.d.ts +131 -131
- package/dist/ts4.2/room/stats.d.ts +71 -71
- package/dist/ts4.2/room/statsSummary.d.ts +13 -13
- package/dist/ts4.2/room/timers.d.ts +12 -12
- package/dist/ts4.2/room/token-source/TokenSource.d.ts +82 -82
- package/dist/ts4.2/room/token-source/types.d.ts +70 -70
- package/dist/ts4.2/room/token-source/utils.d.ts +8 -8
- package/dist/ts4.2/room/track/FrameMetadataExtractor.d.ts +19 -19
- package/dist/ts4.2/room/track/LocalAudioTrack.d.ts +39 -42
- package/dist/ts4.2/room/track/LocalTrack.d.ts +125 -125
- package/dist/ts4.2/room/track/LocalTrackPublication.d.ts +42 -42
- package/dist/ts4.2/room/track/LocalVideoTrack.d.ts +102 -100
- package/dist/ts4.2/room/track/RemoteAudioTrack.d.ts +55 -55
- package/dist/ts4.2/room/track/RemoteTrack.d.ts +38 -38
- package/dist/ts4.2/room/track/RemoteTrackPublication.d.ts +72 -75
- package/dist/ts4.2/room/track/RemoteVideoTrack.d.ts +73 -76
- package/dist/ts4.2/room/track/Track.d.ts +156 -166
- package/dist/ts4.2/room/track/TrackPublication.d.ts +75 -81
- package/dist/ts4.2/room/track/create.d.ts +25 -25
- package/dist/ts4.2/room/track/facingMode.d.ts +41 -41
- package/dist/ts4.2/room/track/options.d.ts +403 -403
- package/dist/ts4.2/room/track/processor/types.d.ts +31 -31
- package/dist/ts4.2/room/track/record.d.ts +13 -13
- package/dist/ts4.2/room/track/types.d.ts +28 -28
- package/dist/ts4.2/room/track/utils.d.ts +60 -47
- package/dist/ts4.2/room/types.d.ts +127 -127
- package/dist/ts4.2/room/utils.d.ts +246 -214
- package/dist/ts4.2/test/MockMediaStreamTrack.d.ts +26 -26
- package/dist/ts4.2/test/compressionStreamStubs.d.ts +12 -0
- package/dist/ts4.2/test/mocks.d.ts +12 -12
- package/dist/ts4.2/test/promiseState.d.ts +12 -12
- package/dist/ts4.2/test/signalToken.d.ts +26 -26
- package/dist/ts4.2/type-polyfills/non-shared-typed-arrays.d.ts +2 -2
- package/dist/ts4.2/utils/AsyncQueue.d.ts +23 -23
- package/dist/ts4.2/utils/TypedPromise.d.ts +17 -17
- package/dist/ts4.2/utils/abort-signal-polyfill.d.ts +13 -13
- package/dist/ts4.2/utils/browserParser.d.ts +13 -13
- package/dist/ts4.2/utils/camelToSnakeCase.d.ts +8 -8
- package/dist/ts4.2/utils/cloneDeep.d.ts +2 -2
- package/dist/ts4.2/utils/dataPacketBuffer.d.ts +34 -34
- package/dist/ts4.2/utils/deferrable-map.d.ts +32 -32
- package/dist/ts4.2/utils/machineInspector.d.ts +54 -54
- package/dist/ts4.2/utils/serializer.d.ts +48 -48
- package/dist/ts4.2/utils/subscribeToEvents.d.ts +15 -15
- package/dist/ts4.2/utils/ttlmap.d.ts +20 -20
- package/dist/ts4.2/version.d.ts +15 -15
- package/package.json +5 -4
- package/src/api/SignalClient.e2e.test.ts +1 -3
- package/src/api/SignalClient.test.ts +160 -10
- package/src/api/SignalClient.ts +75 -54
- package/src/options.ts +16 -0
- package/src/room/PCTransport.test.ts +183 -7
- package/src/room/PCTransport.ts +197 -36
- package/src/room/PCTransportManager.ts +3 -1
- package/src/room/RTCEngine.test.ts +84 -0
- package/src/room/RTCEngine.ts +24 -5
- package/src/room/Room.test.ts +32 -6
- package/src/room/Room.ts +26 -6
- package/src/room/data-stream/incoming/IncomingDataStreamManager.test.ts +16 -20
- package/src/room/data-stream/incoming/IncomingDataStreamManager.ts +5 -5
- package/src/room/data-stream/outgoing/OutgoingDataStreamManager.test.ts +60 -39
- package/src/room/data-stream/outgoing/OutgoingDataStreamManager.ts +4 -4
- package/src/room/defaults.ts +1 -0
- package/src/room/errors.test.ts +36 -0
- package/src/room/errors.ts +27 -0
- package/src/room/events.ts +2 -1
- package/src/room/participant/publishUtils.ts +0 -19
- package/src/room/rpc/client/RpcClientManager.test.ts +51 -0
- package/src/room/rpc/client/RpcClientManager.ts +32 -15
- package/src/room/track/LocalTrack.ts +18 -7
- package/src/room/track/LocalVideoTrack.ts +10 -3
- package/src/room/track/RemoteAudioTrack.ts +3 -3
- package/src/room/track/RemoteVideoTrack.test.ts +210 -0
- package/src/room/track/RemoteVideoTrack.ts +29 -3
- package/src/room/track/utils.test.ts +201 -2
- package/src/room/track/utils.ts +88 -0
- package/src/room/utils.test.ts +124 -0
- package/src/room/utils.ts +70 -0
- package/src/test/compressionStreamStubs.ts +53 -0
|
@@ -1,637 +1,638 @@
|
|
|
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
|
-
* When the signal connection to the server has been interrupted. This isn't noticeable to users most of the time.
|
|
22
|
-
* It will resolve with a `RoomEvent.Reconnected` once the signal connection has been re-established.
|
|
23
|
-
* If media fails additionally it an additional `RoomEvent.Reconnecting` will be emitted.
|
|
24
|
-
*/
|
|
25
|
-
SignalReconnecting = "signalReconnecting",
|
|
26
|
-
/**
|
|
27
|
-
* Fires when a reconnection has been successful.
|
|
28
|
-
*/
|
|
29
|
-
Reconnected = "reconnected",
|
|
30
|
-
/**
|
|
31
|
-
* When disconnected from room. This fires when room.disconnect() is called or
|
|
32
|
-
* when an unrecoverable connection issue had occurred.
|
|
33
|
-
*
|
|
34
|
-
* DisconnectReason can be used to determine why the participant was disconnected. Notable reasons are
|
|
35
|
-
* - DUPLICATE_IDENTITY: another client with the same identity has joined the room
|
|
36
|
-
* - PARTICIPANT_REMOVED: participant was removed by RemoveParticipant API
|
|
37
|
-
* - ROOM_DELETED: the room has ended via DeleteRoom API
|
|
38
|
-
*
|
|
39
|
-
* args: ([[DisconnectReason]])
|
|
40
|
-
*/
|
|
41
|
-
Disconnected = "disconnected",
|
|
42
|
-
/**
|
|
43
|
-
* Whenever the connection state of the room changes
|
|
44
|
-
*
|
|
45
|
-
* args: ([[ConnectionState]])
|
|
46
|
-
*/
|
|
47
|
-
ConnectionStateChanged = "connectionStateChanged",
|
|
48
|
-
/**
|
|
49
|
-
* When participant has been moved to a different room by the service request.
|
|
50
|
-
* The behavior looks like the participant has been disconnected and reconnected to a different room
|
|
51
|
-
* seamlessly without connection state transition.
|
|
52
|
-
* A new token will be provided for reconnecting to the new room if needed.
|
|
53
|
-
*
|
|
54
|
-
* args: ([[room: string, token: string]])
|
|
55
|
-
*/
|
|
56
|
-
Moved = "moved",
|
|
57
|
-
/**
|
|
58
|
-
* When input or output devices on the machine have changed.
|
|
59
|
-
*/
|
|
60
|
-
MediaDevicesChanged = "mediaDevicesChanged",
|
|
61
|
-
/**
|
|
62
|
-
* When a [[RemoteParticipant]] joins *after* the local
|
|
63
|
-
* participant. It will not emit events for participants that are already
|
|
64
|
-
* in the room
|
|
65
|
-
*
|
|
66
|
-
* args: ([[RemoteParticipant]])
|
|
67
|
-
*/
|
|
68
|
-
ParticipantConnected = "participantConnected",
|
|
69
|
-
/**
|
|
70
|
-
* When a [[RemoteParticipant]] leaves *after* the local
|
|
71
|
-
* participant has joined.
|
|
72
|
-
*
|
|
73
|
-
* args: ([[RemoteParticipant]], [[DisconnectReason]] | undefined)
|
|
74
|
-
*/
|
|
75
|
-
ParticipantDisconnected = "participantDisconnected",
|
|
76
|
-
/**
|
|
77
|
-
* When a new track is published to room *after* the local
|
|
78
|
-
* participant has joined. It will not fire for tracks that are already published.
|
|
79
|
-
*
|
|
80
|
-
* A track published doesn't mean the participant has subscribed to it. It's
|
|
81
|
-
* simply reflecting the state of the room.
|
|
82
|
-
*
|
|
83
|
-
* args: ([[RemoteTrackPublication]], [[RemoteParticipant]])
|
|
84
|
-
*/
|
|
85
|
-
TrackPublished = "trackPublished",
|
|
86
|
-
/**
|
|
87
|
-
* The [[LocalParticipant]] has subscribed to a new track. This event will **always**
|
|
88
|
-
* fire as long as new tracks are ready for use.
|
|
89
|
-
*
|
|
90
|
-
* args: ([[RemoteTrack]], [[RemoteTrackPublication]], [[RemoteParticipant]])
|
|
91
|
-
*/
|
|
92
|
-
TrackSubscribed = "trackSubscribed",
|
|
93
|
-
/**
|
|
94
|
-
* Could not subscribe to a track
|
|
95
|
-
*
|
|
96
|
-
* args: (track sid, [[RemoteParticipant]])
|
|
97
|
-
*/
|
|
98
|
-
TrackSubscriptionFailed = "trackSubscriptionFailed",
|
|
99
|
-
/**
|
|
100
|
-
* A [[RemoteParticipant]] has unpublished a track
|
|
101
|
-
*
|
|
102
|
-
* args: ([[RemoteTrackPublication]], [[RemoteParticipant]])
|
|
103
|
-
*/
|
|
104
|
-
TrackUnpublished = "trackUnpublished",
|
|
105
|
-
/**
|
|
106
|
-
* A subscribed track is no longer available. Clients should listen to this
|
|
107
|
-
* event and ensure they detach tracks.
|
|
108
|
-
*
|
|
109
|
-
* args: ([[Track]], [[RemoteTrackPublication]], [[RemoteParticipant]])
|
|
110
|
-
*/
|
|
111
|
-
TrackUnsubscribed = "trackUnsubscribed",
|
|
112
|
-
/**
|
|
113
|
-
* A track that was muted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
|
|
114
|
-
*
|
|
115
|
-
* args: ([[TrackPublication]], [[Participant]])
|
|
116
|
-
*/
|
|
117
|
-
TrackMuted = "trackMuted",
|
|
118
|
-
/**
|
|
119
|
-
* A track that was unmuted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
|
|
120
|
-
*
|
|
121
|
-
* args: ([[TrackPublication]], [[Participant]])
|
|
122
|
-
*/
|
|
123
|
-
TrackUnmuted = "trackUnmuted",
|
|
124
|
-
/**
|
|
125
|
-
* A local track was published successfully. This event is helpful to know
|
|
126
|
-
* when to update your local UI with the newly published track.
|
|
127
|
-
*
|
|
128
|
-
* args: ([[LocalTrackPublication]], [[LocalParticipant]])
|
|
129
|
-
*/
|
|
130
|
-
LocalTrackPublished = "localTrackPublished",
|
|
131
|
-
/**
|
|
132
|
-
* A local track was unpublished. This event is helpful to know when to remove
|
|
133
|
-
* the local track from your UI.
|
|
134
|
-
*
|
|
135
|
-
* When a user stops sharing their screen by pressing "End" on the browser UI,
|
|
136
|
-
* this event will also fire.
|
|
137
|
-
*
|
|
138
|
-
* args: ([[LocalTrackPublication]], [[LocalParticipant]])
|
|
139
|
-
*/
|
|
140
|
-
LocalTrackUnpublished = "localTrackUnpublished",
|
|
141
|
-
/**
|
|
142
|
-
* When a local audio track is published the SDK checks whether there is complete silence
|
|
143
|
-
* on that track and emits the LocalAudioSilenceDetected event in that case.
|
|
144
|
-
* This allows for applications to show UI informing users that they might have to
|
|
145
|
-
* reset their audio hardware or check for proper device connectivity.
|
|
146
|
-
*/
|
|
147
|
-
LocalAudioSilenceDetected = "localAudioSilenceDetected",
|
|
148
|
-
/**
|
|
149
|
-
* Active speakers changed. List of speakers are ordered by their audio level.
|
|
150
|
-
* loudest speakers first. This will include the LocalParticipant too.
|
|
151
|
-
*
|
|
152
|
-
* Speaker updates are sent only to the publishing participant and their subscribers.
|
|
153
|
-
*
|
|
154
|
-
* args: (Array<[[Participant]]>)
|
|
155
|
-
*/
|
|
156
|
-
ActiveSpeakersChanged = "activeSpeakersChanged",
|
|
157
|
-
/**
|
|
158
|
-
* Participant metadata is a simple way for app-specific state to be pushed to
|
|
159
|
-
* all users.
|
|
160
|
-
* When RoomService.UpdateParticipantMetadata is called to change a participant's
|
|
161
|
-
* state, *all* participants in the room will fire this event.
|
|
162
|
-
*
|
|
163
|
-
* args: (prevMetadata: string, [[Participant]])
|
|
164
|
-
*
|
|
165
|
-
*/
|
|
166
|
-
ParticipantMetadataChanged = "participantMetadataChanged",
|
|
167
|
-
/**
|
|
168
|
-
* Participant's display name changed
|
|
169
|
-
*
|
|
170
|
-
* args: (name: string, [[Participant]])
|
|
171
|
-
*
|
|
172
|
-
*/
|
|
173
|
-
ParticipantNameChanged = "participantNameChanged",
|
|
174
|
-
/**
|
|
175
|
-
* Participant attributes is an app-specific key value state to be pushed to
|
|
176
|
-
* all users.
|
|
177
|
-
* When a participant's attributes changed, this event will be emitted with the changed attributes and the participant
|
|
178
|
-
* args: (changedAttributes: [[Record<string, string]], participant: [[Participant]])
|
|
179
|
-
*/
|
|
180
|
-
ParticipantAttributesChanged = "participantAttributesChanged",
|
|
181
|
-
/**
|
|
182
|
-
* Emitted when the participant's state changes to ACTIVE and is ready to send/receive data messages
|
|
183
|
-
*
|
|
184
|
-
* args: (participant: [[Participant]])
|
|
185
|
-
*/
|
|
186
|
-
ParticipantActive = "participantActive",
|
|
187
|
-
/**
|
|
188
|
-
* Room metadata is a simple way for app-specific state to be pushed to
|
|
189
|
-
* all users.
|
|
190
|
-
* When RoomService.UpdateRoomMetadata is called to change a room's state,
|
|
191
|
-
* *all* participants in the room will fire this event.
|
|
192
|
-
*
|
|
193
|
-
* args: (string)
|
|
194
|
-
*/
|
|
195
|
-
RoomMetadataChanged = "roomMetadataChanged",
|
|
196
|
-
/**
|
|
197
|
-
* Data received from another participant.
|
|
198
|
-
* Data packets provides the ability to use LiveKit to send/receive arbitrary payloads.
|
|
199
|
-
* All participants in the room will receive the messages sent to the room.
|
|
200
|
-
*
|
|
201
|
-
* args: (payload: NonSharedUint8Array, participant: [[Participant]], kind: [[DataPacket_Kind]], topic?: string)
|
|
202
|
-
*/
|
|
203
|
-
DataReceived = "dataReceived",
|
|
204
|
-
/**
|
|
205
|
-
* SIP DTMF tones received from another participant.
|
|
206
|
-
*
|
|
207
|
-
* args: (participant: [[Participant]], dtmf: [[DataPacket_Kind]])
|
|
208
|
-
*/
|
|
209
|
-
SipDTMFReceived = "sipDTMFReceived",
|
|
210
|
-
/**
|
|
211
|
-
* Transcription received from a participant's track.
|
|
212
|
-
* @beta
|
|
213
|
-
*/
|
|
214
|
-
TranscriptionReceived = "transcriptionReceived",
|
|
215
|
-
/**
|
|
216
|
-
* Connection quality was changed for a Participant. It'll receive updates
|
|
217
|
-
* from the local participant, as well as any [[RemoteParticipant]]s that we are
|
|
218
|
-
* subscribed to.
|
|
219
|
-
*
|
|
220
|
-
* args: (connectionQuality: [[ConnectionQuality]], participant: [[Participant]])
|
|
221
|
-
*/
|
|
222
|
-
ConnectionQualityChanged = "connectionQualityChanged",
|
|
223
|
-
/**
|
|
224
|
-
* StreamState indicates if a subscribed (remote) track has been paused by the SFU
|
|
225
|
-
* (typically this happens because of subscriber's bandwidth constraints)
|
|
226
|
-
*
|
|
227
|
-
* When bandwidth conditions allow, the track will be resumed automatically.
|
|
228
|
-
* TrackStreamStateChanged will also be emitted when that happens.
|
|
229
|
-
*
|
|
230
|
-
* args: (pub: [[RemoteTrackPublication]], streamState: [[Track.StreamState]],
|
|
231
|
-
* participant: [[RemoteParticipant]])
|
|
232
|
-
*/
|
|
233
|
-
TrackStreamStateChanged = "trackStreamStateChanged",
|
|
234
|
-
/**
|
|
235
|
-
* One of subscribed tracks have changed its permissions for the current
|
|
236
|
-
* participant. If permission was revoked, then the track will no longer
|
|
237
|
-
* be subscribed. If permission was granted, a TrackSubscribed event will
|
|
238
|
-
* be emitted.
|
|
239
|
-
*
|
|
240
|
-
* args: (pub: [[RemoteTrackPublication]],
|
|
241
|
-
* status: [[TrackPublication.PermissionStatus]],
|
|
242
|
-
* participant: [[RemoteParticipant]])
|
|
243
|
-
*/
|
|
244
|
-
TrackSubscriptionPermissionChanged = "trackSubscriptionPermissionChanged",
|
|
245
|
-
/**
|
|
246
|
-
* One of subscribed tracks have changed its status for the current
|
|
247
|
-
* participant.
|
|
248
|
-
*
|
|
249
|
-
* args: (pub: [[RemoteTrackPublication]],
|
|
250
|
-
* status: [[TrackPublication.SubscriptionStatus]],
|
|
251
|
-
* participant: [[RemoteParticipant]])
|
|
252
|
-
*/
|
|
253
|
-
TrackSubscriptionStatusChanged = "trackSubscriptionStatusChanged",
|
|
254
|
-
/**
|
|
255
|
-
* LiveKit will attempt to autoplay all audio tracks when you attach them to
|
|
256
|
-
* audio elements. However, if that fails, we'll notify you via AudioPlaybackStatusChanged.
|
|
257
|
-
* `Room.canPlaybackAudio` will indicate if audio playback is permitted.
|
|
258
|
-
*/
|
|
259
|
-
AudioPlaybackStatusChanged = "audioPlaybackChanged",
|
|
260
|
-
/**
|
|
261
|
-
* LiveKit will attempt to autoplay all video tracks when you attach them to
|
|
262
|
-
* a video element. However, if that fails, we'll notify you via VideoPlaybackStatusChanged.
|
|
263
|
-
* Calling `room.startVideo()` in a user gesture event handler will resume the video playback.
|
|
264
|
-
*/
|
|
265
|
-
VideoPlaybackStatusChanged = "videoPlaybackChanged",
|
|
266
|
-
/**
|
|
267
|
-
* When we have encountered an error while attempting to create a track.
|
|
268
|
-
* The errors take place in getUserMedia().
|
|
269
|
-
* Use MediaDeviceFailure.getFailure(error) to get the reason of failure.
|
|
270
|
-
* [[LocalParticipant.lastCameraError]] and [[LocalParticipant.lastMicrophoneError]]
|
|
271
|
-
* will indicate if it had an error while creating the audio or video track respectively.
|
|
272
|
-
*
|
|
273
|
-
* args: (error: Error)
|
|
274
|
-
*/
|
|
275
|
-
MediaDevicesError = "mediaDevicesError",
|
|
276
|
-
/**
|
|
277
|
-
* A participant's permission has changed.
|
|
278
|
-
* args: (prevPermissions: [[ParticipantPermission]], participant: [[Participant]])
|
|
279
|
-
*/
|
|
280
|
-
ParticipantPermissionsChanged = "participantPermissionsChanged",
|
|
281
|
-
/**
|
|
282
|
-
* Signal connected, can publish tracks.
|
|
283
|
-
*/
|
|
284
|
-
SignalConnected = "signalConnected",
|
|
285
|
-
/**
|
|
286
|
-
* Recording of a room has started/stopped. Room.isRecording will be updated too.
|
|
287
|
-
* args: (isRecording: boolean)
|
|
288
|
-
*/
|
|
289
|
-
RecordingStatusChanged = "recordingStatusChanged",
|
|
290
|
-
ParticipantEncryptionStatusChanged = "participantEncryptionStatusChanged",
|
|
291
|
-
EncryptionError = "encryptionError",
|
|
292
|
-
/**
|
|
293
|
-
* Emits whenever the current buffer status of a data channel changes
|
|
294
|
-
* args: (isLow: boolean, kind: [[DataChannelKind]])
|
|
295
|
-
*/
|
|
296
|
-
DCBufferStatusChanged = "dcBufferStatusChanged",
|
|
297
|
-
/**
|
|
298
|
-
* Triggered by a call to room.switchActiveDevice
|
|
299
|
-
* args: (kind: MediaDeviceKind, deviceId: string)
|
|
300
|
-
*/
|
|
301
|
-
ActiveDeviceChanged = "activeDeviceChanged",
|
|
302
|
-
ChatMessage = "chatMessage",
|
|
303
|
-
/**
|
|
304
|
-
* fired when the first remote participant has subscribed to the localParticipant's track
|
|
305
|
-
*/
|
|
306
|
-
LocalTrackSubscribed = "localTrackSubscribed",
|
|
307
|
-
/**
|
|
308
|
-
* fired when the client receives connection metrics from other participants
|
|
309
|
-
*/
|
|
310
|
-
MetricsReceived = "metricsReceived",
|
|
311
|
-
/**
|
|
312
|
-
* Emits when a new data track has been published by a downstream participant.
|
|
313
|
-
*/
|
|
314
|
-
DataTrackPublished = "dataTrackPublished",
|
|
315
|
-
/**
|
|
316
|
-
* Emits when a new data track has been unpublished by a downstream participant.
|
|
317
|
-
*/
|
|
318
|
-
DataTrackUnpublished = "dataTrackUnpublished",
|
|
319
|
-
/**
|
|
320
|
-
* Emits when a new data track has been published locally.
|
|
321
|
-
*/
|
|
322
|
-
LocalDataTrackPublished = "localDataTrackPublished",
|
|
323
|
-
/**
|
|
324
|
-
* Emits when a new data track has been unpublished locally.
|
|
325
|
-
*/
|
|
326
|
-
LocalDataTrackUnpublished = "localDataTrackUnpublished"
|
|
327
|
-
}
|
|
328
|
-
export declare enum ParticipantEvent {
|
|
329
|
-
/**
|
|
330
|
-
* When a new track is published to room *after* the local
|
|
331
|
-
* participant has joined. It will not fire for tracks that are already published.
|
|
332
|
-
*
|
|
333
|
-
* A track published doesn't mean the participant has subscribed to it. It's
|
|
334
|
-
* simply reflecting the state of the room.
|
|
335
|
-
*
|
|
336
|
-
* args: ([[RemoteTrackPublication]])
|
|
337
|
-
*/
|
|
338
|
-
TrackPublished = "trackPublished",
|
|
339
|
-
/**
|
|
340
|
-
* Successfully subscribed to the [[RemoteParticipant]]'s track.
|
|
341
|
-
* This event will **always** fire as long as new tracks are ready for use.
|
|
342
|
-
*
|
|
343
|
-
* args: ([[RemoteTrack]], [[RemoteTrackPublication]])
|
|
344
|
-
*/
|
|
345
|
-
TrackSubscribed = "trackSubscribed",
|
|
346
|
-
/**
|
|
347
|
-
* Could not subscribe to a track
|
|
348
|
-
*
|
|
349
|
-
* args: (track sid)
|
|
350
|
-
*/
|
|
351
|
-
TrackSubscriptionFailed = "trackSubscriptionFailed",
|
|
352
|
-
/**
|
|
353
|
-
* A [[RemoteParticipant]] has unpublished a track
|
|
354
|
-
*
|
|
355
|
-
* args: ([[RemoteTrackPublication]])
|
|
356
|
-
*/
|
|
357
|
-
TrackUnpublished = "trackUnpublished",
|
|
358
|
-
/**
|
|
359
|
-
* A subscribed track is no longer available. Clients should listen to this
|
|
360
|
-
* event and ensure they detach tracks.
|
|
361
|
-
*
|
|
362
|
-
* args: ([[RemoteTrack]], [[RemoteTrackPublication]])
|
|
363
|
-
*/
|
|
364
|
-
TrackUnsubscribed = "trackUnsubscribed",
|
|
365
|
-
/**
|
|
366
|
-
* A track that was muted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
|
|
367
|
-
*
|
|
368
|
-
* args: ([[TrackPublication]])
|
|
369
|
-
*/
|
|
370
|
-
TrackMuted = "trackMuted",
|
|
371
|
-
/**
|
|
372
|
-
* A track that was unmuted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
|
|
373
|
-
*
|
|
374
|
-
* args: ([[TrackPublication]])
|
|
375
|
-
*/
|
|
376
|
-
TrackUnmuted = "trackUnmuted",
|
|
377
|
-
/**
|
|
378
|
-
* A local track was published successfully. This event is helpful to know
|
|
379
|
-
* when to update your local UI with the newly published track.
|
|
380
|
-
*
|
|
381
|
-
* args: ([[LocalTrackPublication]])
|
|
382
|
-
*/
|
|
383
|
-
LocalTrackPublished = "localTrackPublished",
|
|
384
|
-
/**
|
|
385
|
-
* A local track was unpublished. This event is helpful to know when to remove
|
|
386
|
-
* the local track from your UI.
|
|
387
|
-
*
|
|
388
|
-
* When a user stops sharing their screen by pressing "End" on the browser UI,
|
|
389
|
-
* this event will also fire.
|
|
390
|
-
*
|
|
391
|
-
* args: ([[LocalTrackPublication]])
|
|
392
|
-
*/
|
|
393
|
-
LocalTrackUnpublished = "localTrackUnpublished",
|
|
394
|
-
/**
|
|
395
|
-
* A local track has been constrained by cpu.
|
|
396
|
-
* This event is useful to know when to reduce the capture resolution of the track.
|
|
397
|
-
*
|
|
398
|
-
* This event is emitted on the local participant.
|
|
399
|
-
*
|
|
400
|
-
* args: ([[LocalVideoTrack]], [[LocalTrackPublication]])
|
|
401
|
-
*/
|
|
402
|
-
LocalTrackCpuConstrained = "localTrackCpuConstrained",
|
|
403
|
-
/**
|
|
404
|
-
* @internal
|
|
405
|
-
*/
|
|
406
|
-
LocalSenderCreated = "localSenderCreated",
|
|
407
|
-
/**
|
|
408
|
-
* Participant metadata is a simple way for app-specific state to be pushed to
|
|
409
|
-
* all users.
|
|
410
|
-
* When RoomService.UpdateParticipantMetadata is called to change a participant's
|
|
411
|
-
* state, *all* participants in the room will fire this event.
|
|
412
|
-
* To access the current metadata, see [[Participant.metadata]].
|
|
413
|
-
*
|
|
414
|
-
* args: (prevMetadata: string)
|
|
415
|
-
*
|
|
416
|
-
*/
|
|
417
|
-
ParticipantMetadataChanged = "participantMetadataChanged",
|
|
418
|
-
/**
|
|
419
|
-
* Participant's display name changed
|
|
420
|
-
*
|
|
421
|
-
* args: (name: string, [[Participant]])
|
|
422
|
-
*
|
|
423
|
-
*/
|
|
424
|
-
ParticipantNameChanged = "participantNameChanged",
|
|
425
|
-
/**
|
|
426
|
-
* Data received from this participant as sender.
|
|
427
|
-
* Data packets provides the ability to use LiveKit to send/receive arbitrary payloads.
|
|
428
|
-
* All participants in the room will receive the messages sent to the room.
|
|
429
|
-
*
|
|
430
|
-
* args: (payload: NonSharedUint8Array, kind: [[DataPacket_Kind]])
|
|
431
|
-
*/
|
|
432
|
-
DataReceived = "dataReceived",
|
|
433
|
-
/**
|
|
434
|
-
* SIP DTMF tones received from this participant as sender.
|
|
435
|
-
*
|
|
436
|
-
* args: (dtmf: [[DataPacket_Kind]])
|
|
437
|
-
*/
|
|
438
|
-
SipDTMFReceived = "sipDTMFReceived",
|
|
439
|
-
/**
|
|
440
|
-
* Transcription received from this participant as data source.
|
|
441
|
-
* @beta
|
|
442
|
-
*/
|
|
443
|
-
TranscriptionReceived = "transcriptionReceived",
|
|
444
|
-
/**
|
|
445
|
-
* Has speaking status changed for the current participant
|
|
446
|
-
*
|
|
447
|
-
* args: (speaking: boolean)
|
|
448
|
-
*/
|
|
449
|
-
IsSpeakingChanged = "isSpeakingChanged",
|
|
450
|
-
/**
|
|
451
|
-
* Connection quality was changed for a Participant. It'll receive updates
|
|
452
|
-
* from the local participant, as well as any [[RemoteParticipant]]s that we are
|
|
453
|
-
* subscribed to.
|
|
454
|
-
*
|
|
455
|
-
* args: (connectionQuality: [[ConnectionQuality]])
|
|
456
|
-
*/
|
|
457
|
-
ConnectionQualityChanged = "connectionQualityChanged",
|
|
458
|
-
/**
|
|
459
|
-
* StreamState indicates if a subscribed track has been paused by the SFU
|
|
460
|
-
* (typically this happens because of subscriber's bandwidth constraints)
|
|
461
|
-
*
|
|
462
|
-
* When bandwidth conditions allow, the track will be resumed automatically.
|
|
463
|
-
* TrackStreamStateChanged will also be emitted when that happens.
|
|
464
|
-
*
|
|
465
|
-
* args: (pub: [[RemoteTrackPublication]], streamState: [[Track.StreamState]])
|
|
466
|
-
*/
|
|
467
|
-
TrackStreamStateChanged = "trackStreamStateChanged",
|
|
468
|
-
/**
|
|
469
|
-
* One of subscribed tracks have changed its permissions for the current
|
|
470
|
-
* participant. If permission was revoked, then the track will no longer
|
|
471
|
-
* be subscribed. If permission was granted, a TrackSubscribed event will
|
|
472
|
-
* be emitted.
|
|
473
|
-
*
|
|
474
|
-
* args: (pub: [[RemoteTrackPublication]],
|
|
475
|
-
* status: [[TrackPublication.SubscriptionStatus]])
|
|
476
|
-
*/
|
|
477
|
-
TrackSubscriptionPermissionChanged = "trackSubscriptionPermissionChanged",
|
|
478
|
-
/**
|
|
479
|
-
* One of the remote participants publications has changed its subscription status.
|
|
480
|
-
*
|
|
481
|
-
*/
|
|
482
|
-
TrackSubscriptionStatusChanged = "trackSubscriptionStatusChanged",
|
|
483
|
-
/**
|
|
484
|
-
* a local track has been constrained by cpu
|
|
485
|
-
*/
|
|
486
|
-
TrackCpuConstrained = "trackCpuConstrained",
|
|
487
|
-
/** @internal */
|
|
488
|
-
MediaDevicesError = "mediaDevicesError",
|
|
489
|
-
/** @internal */
|
|
490
|
-
AudioStreamAcquired = "audioStreamAcquired",
|
|
491
|
-
/**
|
|
492
|
-
* A participant's permission has changed.
|
|
493
|
-
* args: (prevPermissions: [[ParticipantPermission]])
|
|
494
|
-
*/
|
|
495
|
-
ParticipantPermissionsChanged = "participantPermissionsChanged",
|
|
496
|
-
/** @internal */
|
|
497
|
-
PCTrackAdded = "pcTrackAdded",
|
|
498
|
-
/**
|
|
499
|
-
* Participant attributes is an app-specific key value state to be pushed to
|
|
500
|
-
* all users.
|
|
501
|
-
* When a participant's attributes changed, this event will be emitted with the changed attributes
|
|
502
|
-
* args: (changedAttributes: [[Record<string, string]])
|
|
503
|
-
*/
|
|
504
|
-
AttributesChanged = "attributesChanged",
|
|
505
|
-
/**
|
|
506
|
-
* fired on local participant only, when the first remote participant has subscribed to the track specified in the payload
|
|
507
|
-
*/
|
|
508
|
-
LocalTrackSubscribed = "localTrackSubscribed",
|
|
509
|
-
/** only emitted on local participant */
|
|
510
|
-
ChatMessage = "chatMessage",
|
|
511
|
-
/**
|
|
512
|
-
* Emitted when the participant's state changes to ACTIVE and is ready to send/receive data messages
|
|
513
|
-
*/
|
|
514
|
-
Active = "active"
|
|
515
|
-
}
|
|
516
|
-
/** @internal */
|
|
517
|
-
export declare enum EngineEvent {
|
|
518
|
-
TransportsCreated = "transportsCreated",
|
|
519
|
-
Connected = "connected",
|
|
520
|
-
Disconnected = "disconnected",
|
|
521
|
-
Resuming = "resuming",
|
|
522
|
-
Resumed = "resumed",
|
|
523
|
-
Restarting = "restarting",
|
|
524
|
-
Restarted = "restarted",
|
|
525
|
-
SignalResumed = "signalResumed",
|
|
526
|
-
SignalRestarted = "signalRestarted",
|
|
527
|
-
Closing = "closing",
|
|
528
|
-
MediaTrackAdded = "mediaTrackAdded",
|
|
529
|
-
ActiveSpeakersUpdate = "activeSpeakersUpdate",
|
|
530
|
-
DataPacketReceived = "dataPacketReceived",
|
|
531
|
-
RTPVideoMapUpdate = "rtpVideoMapUpdate",
|
|
532
|
-
DCBufferStatusChanged = "dcBufferStatusChanged",
|
|
533
|
-
ParticipantUpdate = "participantUpdate",
|
|
534
|
-
RoomUpdate = "roomUpdate",
|
|
535
|
-
SpeakersChanged = "speakersChanged",
|
|
536
|
-
StreamStateChanged = "streamStateChanged",
|
|
537
|
-
ConnectionQualityUpdate = "connectionQualityUpdate",
|
|
538
|
-
SubscriptionError = "subscriptionError",
|
|
539
|
-
SubscriptionPermissionUpdate = "subscriptionPermissionUpdate",
|
|
540
|
-
RemoteMute = "remoteMute",
|
|
541
|
-
SubscribedQualityUpdate = "subscribedQualityUpdate",
|
|
542
|
-
LocalTrackUnpublished = "localTrackUnpublished",
|
|
543
|
-
LocalTrackSubscribed = "localTrackSubscribed",
|
|
544
|
-
Offline = "offline",
|
|
545
|
-
SignalRequestResponse = "signalRequestResponse",
|
|
546
|
-
SignalConnected = "signalConnected",
|
|
547
|
-
RoomMoved = "roomMoved",
|
|
548
|
-
PublishDataTrackResponse = "publishDataTrackResponse",
|
|
549
|
-
UnPublishDataTrackResponse = "unPublishDataTrackResponse",
|
|
550
|
-
DataTrackSubscriberHandles = "dataTrackSubscriberHandles",
|
|
551
|
-
DataTrackPacketReceived = "dataTrackPacketReceived",
|
|
552
|
-
Joined = "joined",
|
|
553
|
-
TokenRefreshed = "tokenRefreshed",
|
|
554
|
-
ServerRegionsReported = "serverRegionsReported"
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
*
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
*
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
*
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
*
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
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
|
+
* When the signal connection to the server has been interrupted. This isn't noticeable to users most of the time.
|
|
22
|
+
* It will resolve with a `RoomEvent.Reconnected` once the signal connection has been re-established.
|
|
23
|
+
* If media fails additionally it an additional `RoomEvent.Reconnecting` will be emitted.
|
|
24
|
+
*/
|
|
25
|
+
SignalReconnecting = "signalReconnecting",
|
|
26
|
+
/**
|
|
27
|
+
* Fires when a reconnection has been successful.
|
|
28
|
+
*/
|
|
29
|
+
Reconnected = "reconnected",
|
|
30
|
+
/**
|
|
31
|
+
* When disconnected from room. This fires when room.disconnect() is called or
|
|
32
|
+
* when an unrecoverable connection issue had occurred.
|
|
33
|
+
*
|
|
34
|
+
* DisconnectReason can be used to determine why the participant was disconnected. Notable reasons are
|
|
35
|
+
* - DUPLICATE_IDENTITY: another client with the same identity has joined the room
|
|
36
|
+
* - PARTICIPANT_REMOVED: participant was removed by RemoveParticipant API
|
|
37
|
+
* - ROOM_DELETED: the room has ended via DeleteRoom API
|
|
38
|
+
*
|
|
39
|
+
* args: ([[DisconnectReason]])
|
|
40
|
+
*/
|
|
41
|
+
Disconnected = "disconnected",
|
|
42
|
+
/**
|
|
43
|
+
* Whenever the connection state of the room changes
|
|
44
|
+
*
|
|
45
|
+
* args: ([[ConnectionState]])
|
|
46
|
+
*/
|
|
47
|
+
ConnectionStateChanged = "connectionStateChanged",
|
|
48
|
+
/**
|
|
49
|
+
* When participant has been moved to a different room by the service request.
|
|
50
|
+
* The behavior looks like the participant has been disconnected and reconnected to a different room
|
|
51
|
+
* seamlessly without connection state transition.
|
|
52
|
+
* A new token will be provided for reconnecting to the new room if needed.
|
|
53
|
+
*
|
|
54
|
+
* args: ([[room: string, token: string]])
|
|
55
|
+
*/
|
|
56
|
+
Moved = "moved",
|
|
57
|
+
/**
|
|
58
|
+
* When input or output devices on the machine have changed.
|
|
59
|
+
*/
|
|
60
|
+
MediaDevicesChanged = "mediaDevicesChanged",
|
|
61
|
+
/**
|
|
62
|
+
* When a [[RemoteParticipant]] joins *after* the local
|
|
63
|
+
* participant. It will not emit events for participants that are already
|
|
64
|
+
* in the room
|
|
65
|
+
*
|
|
66
|
+
* args: ([[RemoteParticipant]])
|
|
67
|
+
*/
|
|
68
|
+
ParticipantConnected = "participantConnected",
|
|
69
|
+
/**
|
|
70
|
+
* When a [[RemoteParticipant]] leaves *after* the local
|
|
71
|
+
* participant has joined.
|
|
72
|
+
*
|
|
73
|
+
* args: ([[RemoteParticipant]], [[DisconnectReason]] | undefined)
|
|
74
|
+
*/
|
|
75
|
+
ParticipantDisconnected = "participantDisconnected",
|
|
76
|
+
/**
|
|
77
|
+
* When a new track is published to room *after* the local
|
|
78
|
+
* participant has joined. It will not fire for tracks that are already published.
|
|
79
|
+
*
|
|
80
|
+
* A track published doesn't mean the participant has subscribed to it. It's
|
|
81
|
+
* simply reflecting the state of the room.
|
|
82
|
+
*
|
|
83
|
+
* args: ([[RemoteTrackPublication]], [[RemoteParticipant]])
|
|
84
|
+
*/
|
|
85
|
+
TrackPublished = "trackPublished",
|
|
86
|
+
/**
|
|
87
|
+
* The [[LocalParticipant]] has subscribed to a new track. This event will **always**
|
|
88
|
+
* fire as long as new tracks are ready for use.
|
|
89
|
+
*
|
|
90
|
+
* args: ([[RemoteTrack]], [[RemoteTrackPublication]], [[RemoteParticipant]])
|
|
91
|
+
*/
|
|
92
|
+
TrackSubscribed = "trackSubscribed",
|
|
93
|
+
/**
|
|
94
|
+
* Could not subscribe to a track
|
|
95
|
+
*
|
|
96
|
+
* args: (track sid, [[RemoteParticipant]])
|
|
97
|
+
*/
|
|
98
|
+
TrackSubscriptionFailed = "trackSubscriptionFailed",
|
|
99
|
+
/**
|
|
100
|
+
* A [[RemoteParticipant]] has unpublished a track
|
|
101
|
+
*
|
|
102
|
+
* args: ([[RemoteTrackPublication]], [[RemoteParticipant]])
|
|
103
|
+
*/
|
|
104
|
+
TrackUnpublished = "trackUnpublished",
|
|
105
|
+
/**
|
|
106
|
+
* A subscribed track is no longer available. Clients should listen to this
|
|
107
|
+
* event and ensure they detach tracks.
|
|
108
|
+
*
|
|
109
|
+
* args: ([[Track]], [[RemoteTrackPublication]], [[RemoteParticipant]])
|
|
110
|
+
*/
|
|
111
|
+
TrackUnsubscribed = "trackUnsubscribed",
|
|
112
|
+
/**
|
|
113
|
+
* A track that was muted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
|
|
114
|
+
*
|
|
115
|
+
* args: ([[TrackPublication]], [[Participant]])
|
|
116
|
+
*/
|
|
117
|
+
TrackMuted = "trackMuted",
|
|
118
|
+
/**
|
|
119
|
+
* A track that was unmuted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
|
|
120
|
+
*
|
|
121
|
+
* args: ([[TrackPublication]], [[Participant]])
|
|
122
|
+
*/
|
|
123
|
+
TrackUnmuted = "trackUnmuted",
|
|
124
|
+
/**
|
|
125
|
+
* A local track was published successfully. This event is helpful to know
|
|
126
|
+
* when to update your local UI with the newly published track.
|
|
127
|
+
*
|
|
128
|
+
* args: ([[LocalTrackPublication]], [[LocalParticipant]])
|
|
129
|
+
*/
|
|
130
|
+
LocalTrackPublished = "localTrackPublished",
|
|
131
|
+
/**
|
|
132
|
+
* A local track was unpublished. This event is helpful to know when to remove
|
|
133
|
+
* the local track from your UI.
|
|
134
|
+
*
|
|
135
|
+
* When a user stops sharing their screen by pressing "End" on the browser UI,
|
|
136
|
+
* this event will also fire.
|
|
137
|
+
*
|
|
138
|
+
* args: ([[LocalTrackPublication]], [[LocalParticipant]])
|
|
139
|
+
*/
|
|
140
|
+
LocalTrackUnpublished = "localTrackUnpublished",
|
|
141
|
+
/**
|
|
142
|
+
* When a local audio track is published the SDK checks whether there is complete silence
|
|
143
|
+
* on that track and emits the LocalAudioSilenceDetected event in that case.
|
|
144
|
+
* This allows for applications to show UI informing users that they might have to
|
|
145
|
+
* reset their audio hardware or check for proper device connectivity.
|
|
146
|
+
*/
|
|
147
|
+
LocalAudioSilenceDetected = "localAudioSilenceDetected",
|
|
148
|
+
/**
|
|
149
|
+
* Active speakers changed. List of speakers are ordered by their audio level.
|
|
150
|
+
* loudest speakers first. This will include the LocalParticipant too.
|
|
151
|
+
*
|
|
152
|
+
* Speaker updates are sent only to the publishing participant and their subscribers.
|
|
153
|
+
*
|
|
154
|
+
* args: (Array<[[Participant]]>)
|
|
155
|
+
*/
|
|
156
|
+
ActiveSpeakersChanged = "activeSpeakersChanged",
|
|
157
|
+
/**
|
|
158
|
+
* Participant metadata is a simple way for app-specific state to be pushed to
|
|
159
|
+
* all users.
|
|
160
|
+
* When RoomService.UpdateParticipantMetadata is called to change a participant's
|
|
161
|
+
* state, *all* participants in the room will fire this event.
|
|
162
|
+
*
|
|
163
|
+
* args: (prevMetadata: string, [[Participant]])
|
|
164
|
+
*
|
|
165
|
+
*/
|
|
166
|
+
ParticipantMetadataChanged = "participantMetadataChanged",
|
|
167
|
+
/**
|
|
168
|
+
* Participant's display name changed
|
|
169
|
+
*
|
|
170
|
+
* args: (name: string, [[Participant]])
|
|
171
|
+
*
|
|
172
|
+
*/
|
|
173
|
+
ParticipantNameChanged = "participantNameChanged",
|
|
174
|
+
/**
|
|
175
|
+
* Participant attributes is an app-specific key value state to be pushed to
|
|
176
|
+
* all users.
|
|
177
|
+
* When a participant's attributes changed, this event will be emitted with the changed attributes and the participant
|
|
178
|
+
* args: (changedAttributes: [[Record<string, string]], participant: [[Participant]])
|
|
179
|
+
*/
|
|
180
|
+
ParticipantAttributesChanged = "participantAttributesChanged",
|
|
181
|
+
/**
|
|
182
|
+
* Emitted when the participant's state changes to ACTIVE and is ready to send/receive data messages
|
|
183
|
+
*
|
|
184
|
+
* args: (participant: [[Participant]])
|
|
185
|
+
*/
|
|
186
|
+
ParticipantActive = "participantActive",
|
|
187
|
+
/**
|
|
188
|
+
* Room metadata is a simple way for app-specific state to be pushed to
|
|
189
|
+
* all users.
|
|
190
|
+
* When RoomService.UpdateRoomMetadata is called to change a room's state,
|
|
191
|
+
* *all* participants in the room will fire this event.
|
|
192
|
+
*
|
|
193
|
+
* args: (string)
|
|
194
|
+
*/
|
|
195
|
+
RoomMetadataChanged = "roomMetadataChanged",
|
|
196
|
+
/**
|
|
197
|
+
* Data received from another participant.
|
|
198
|
+
* Data packets provides the ability to use LiveKit to send/receive arbitrary payloads.
|
|
199
|
+
* All participants in the room will receive the messages sent to the room.
|
|
200
|
+
*
|
|
201
|
+
* args: (payload: NonSharedUint8Array, participant: [[Participant]] | undefined, kind: [[DataPacket_Kind]], topic?: string, encryptionType?: Encryption_Type, participantIdentity?: string)
|
|
202
|
+
*/
|
|
203
|
+
DataReceived = "dataReceived",
|
|
204
|
+
/**
|
|
205
|
+
* SIP DTMF tones received from another participant.
|
|
206
|
+
*
|
|
207
|
+
* args: (participant: [[Participant]], dtmf: [[DataPacket_Kind]])
|
|
208
|
+
*/
|
|
209
|
+
SipDTMFReceived = "sipDTMFReceived",
|
|
210
|
+
/**
|
|
211
|
+
* Transcription received from a participant's track.
|
|
212
|
+
* @beta
|
|
213
|
+
*/
|
|
214
|
+
TranscriptionReceived = "transcriptionReceived",
|
|
215
|
+
/**
|
|
216
|
+
* Connection quality was changed for a Participant. It'll receive updates
|
|
217
|
+
* from the local participant, as well as any [[RemoteParticipant]]s that we are
|
|
218
|
+
* subscribed to.
|
|
219
|
+
*
|
|
220
|
+
* args: (connectionQuality: [[ConnectionQuality]], participant: [[Participant]])
|
|
221
|
+
*/
|
|
222
|
+
ConnectionQualityChanged = "connectionQualityChanged",
|
|
223
|
+
/**
|
|
224
|
+
* StreamState indicates if a subscribed (remote) track has been paused by the SFU
|
|
225
|
+
* (typically this happens because of subscriber's bandwidth constraints)
|
|
226
|
+
*
|
|
227
|
+
* When bandwidth conditions allow, the track will be resumed automatically.
|
|
228
|
+
* TrackStreamStateChanged will also be emitted when that happens.
|
|
229
|
+
*
|
|
230
|
+
* args: (pub: [[RemoteTrackPublication]], streamState: [[Track.StreamState]],
|
|
231
|
+
* participant: [[RemoteParticipant]])
|
|
232
|
+
*/
|
|
233
|
+
TrackStreamStateChanged = "trackStreamStateChanged",
|
|
234
|
+
/**
|
|
235
|
+
* One of subscribed tracks have changed its permissions for the current
|
|
236
|
+
* participant. If permission was revoked, then the track will no longer
|
|
237
|
+
* be subscribed. If permission was granted, a TrackSubscribed event will
|
|
238
|
+
* be emitted.
|
|
239
|
+
*
|
|
240
|
+
* args: (pub: [[RemoteTrackPublication]],
|
|
241
|
+
* status: [[TrackPublication.PermissionStatus]],
|
|
242
|
+
* participant: [[RemoteParticipant]])
|
|
243
|
+
*/
|
|
244
|
+
TrackSubscriptionPermissionChanged = "trackSubscriptionPermissionChanged",
|
|
245
|
+
/**
|
|
246
|
+
* One of subscribed tracks have changed its status for the current
|
|
247
|
+
* participant.
|
|
248
|
+
*
|
|
249
|
+
* args: (pub: [[RemoteTrackPublication]],
|
|
250
|
+
* status: [[TrackPublication.SubscriptionStatus]],
|
|
251
|
+
* participant: [[RemoteParticipant]])
|
|
252
|
+
*/
|
|
253
|
+
TrackSubscriptionStatusChanged = "trackSubscriptionStatusChanged",
|
|
254
|
+
/**
|
|
255
|
+
* LiveKit will attempt to autoplay all audio tracks when you attach them to
|
|
256
|
+
* audio elements. However, if that fails, we'll notify you via AudioPlaybackStatusChanged.
|
|
257
|
+
* `Room.canPlaybackAudio` will indicate if audio playback is permitted.
|
|
258
|
+
*/
|
|
259
|
+
AudioPlaybackStatusChanged = "audioPlaybackChanged",
|
|
260
|
+
/**
|
|
261
|
+
* LiveKit will attempt to autoplay all video tracks when you attach them to
|
|
262
|
+
* a video element. However, if that fails, we'll notify you via VideoPlaybackStatusChanged.
|
|
263
|
+
* Calling `room.startVideo()` in a user gesture event handler will resume the video playback.
|
|
264
|
+
*/
|
|
265
|
+
VideoPlaybackStatusChanged = "videoPlaybackChanged",
|
|
266
|
+
/**
|
|
267
|
+
* When we have encountered an error while attempting to create a track.
|
|
268
|
+
* The errors take place in getUserMedia().
|
|
269
|
+
* Use MediaDeviceFailure.getFailure(error) to get the reason of failure.
|
|
270
|
+
* [[LocalParticipant.lastCameraError]] and [[LocalParticipant.lastMicrophoneError]]
|
|
271
|
+
* will indicate if it had an error while creating the audio or video track respectively.
|
|
272
|
+
*
|
|
273
|
+
* args: (error: Error)
|
|
274
|
+
*/
|
|
275
|
+
MediaDevicesError = "mediaDevicesError",
|
|
276
|
+
/**
|
|
277
|
+
* A participant's permission has changed.
|
|
278
|
+
* args: (prevPermissions: [[ParticipantPermission]], participant: [[Participant]])
|
|
279
|
+
*/
|
|
280
|
+
ParticipantPermissionsChanged = "participantPermissionsChanged",
|
|
281
|
+
/**
|
|
282
|
+
* Signal connected, can publish tracks.
|
|
283
|
+
*/
|
|
284
|
+
SignalConnected = "signalConnected",
|
|
285
|
+
/**
|
|
286
|
+
* Recording of a room has started/stopped. Room.isRecording will be updated too.
|
|
287
|
+
* args: (isRecording: boolean)
|
|
288
|
+
*/
|
|
289
|
+
RecordingStatusChanged = "recordingStatusChanged",
|
|
290
|
+
ParticipantEncryptionStatusChanged = "participantEncryptionStatusChanged",
|
|
291
|
+
EncryptionError = "encryptionError",
|
|
292
|
+
/**
|
|
293
|
+
* Emits whenever the current buffer status of a data channel changes
|
|
294
|
+
* args: (isLow: boolean, kind: [[DataChannelKind]])
|
|
295
|
+
*/
|
|
296
|
+
DCBufferStatusChanged = "dcBufferStatusChanged",
|
|
297
|
+
/**
|
|
298
|
+
* Triggered by a call to room.switchActiveDevice
|
|
299
|
+
* args: (kind: MediaDeviceKind, deviceId: string)
|
|
300
|
+
*/
|
|
301
|
+
ActiveDeviceChanged = "activeDeviceChanged",
|
|
302
|
+
ChatMessage = "chatMessage",
|
|
303
|
+
/**
|
|
304
|
+
* fired when the first remote participant has subscribed to the localParticipant's track
|
|
305
|
+
*/
|
|
306
|
+
LocalTrackSubscribed = "localTrackSubscribed",
|
|
307
|
+
/**
|
|
308
|
+
* fired when the client receives connection metrics from other participants
|
|
309
|
+
*/
|
|
310
|
+
MetricsReceived = "metricsReceived",
|
|
311
|
+
/**
|
|
312
|
+
* Emits when a new data track has been published by a downstream participant.
|
|
313
|
+
*/
|
|
314
|
+
DataTrackPublished = "dataTrackPublished",
|
|
315
|
+
/**
|
|
316
|
+
* Emits when a new data track has been unpublished by a downstream participant.
|
|
317
|
+
*/
|
|
318
|
+
DataTrackUnpublished = "dataTrackUnpublished",
|
|
319
|
+
/**
|
|
320
|
+
* Emits when a new data track has been published locally.
|
|
321
|
+
*/
|
|
322
|
+
LocalDataTrackPublished = "localDataTrackPublished",
|
|
323
|
+
/**
|
|
324
|
+
* Emits when a new data track has been unpublished locally.
|
|
325
|
+
*/
|
|
326
|
+
LocalDataTrackUnpublished = "localDataTrackUnpublished"
|
|
327
|
+
}
|
|
328
|
+
export declare enum ParticipantEvent {
|
|
329
|
+
/**
|
|
330
|
+
* When a new track is published to room *after* the local
|
|
331
|
+
* participant has joined. It will not fire for tracks that are already published.
|
|
332
|
+
*
|
|
333
|
+
* A track published doesn't mean the participant has subscribed to it. It's
|
|
334
|
+
* simply reflecting the state of the room.
|
|
335
|
+
*
|
|
336
|
+
* args: ([[RemoteTrackPublication]])
|
|
337
|
+
*/
|
|
338
|
+
TrackPublished = "trackPublished",
|
|
339
|
+
/**
|
|
340
|
+
* Successfully subscribed to the [[RemoteParticipant]]'s track.
|
|
341
|
+
* This event will **always** fire as long as new tracks are ready for use.
|
|
342
|
+
*
|
|
343
|
+
* args: ([[RemoteTrack]], [[RemoteTrackPublication]])
|
|
344
|
+
*/
|
|
345
|
+
TrackSubscribed = "trackSubscribed",
|
|
346
|
+
/**
|
|
347
|
+
* Could not subscribe to a track
|
|
348
|
+
*
|
|
349
|
+
* args: (track sid)
|
|
350
|
+
*/
|
|
351
|
+
TrackSubscriptionFailed = "trackSubscriptionFailed",
|
|
352
|
+
/**
|
|
353
|
+
* A [[RemoteParticipant]] has unpublished a track
|
|
354
|
+
*
|
|
355
|
+
* args: ([[RemoteTrackPublication]])
|
|
356
|
+
*/
|
|
357
|
+
TrackUnpublished = "trackUnpublished",
|
|
358
|
+
/**
|
|
359
|
+
* A subscribed track is no longer available. Clients should listen to this
|
|
360
|
+
* event and ensure they detach tracks.
|
|
361
|
+
*
|
|
362
|
+
* args: ([[RemoteTrack]], [[RemoteTrackPublication]])
|
|
363
|
+
*/
|
|
364
|
+
TrackUnsubscribed = "trackUnsubscribed",
|
|
365
|
+
/**
|
|
366
|
+
* A track that was muted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
|
|
367
|
+
*
|
|
368
|
+
* args: ([[TrackPublication]])
|
|
369
|
+
*/
|
|
370
|
+
TrackMuted = "trackMuted",
|
|
371
|
+
/**
|
|
372
|
+
* A track that was unmuted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
|
|
373
|
+
*
|
|
374
|
+
* args: ([[TrackPublication]])
|
|
375
|
+
*/
|
|
376
|
+
TrackUnmuted = "trackUnmuted",
|
|
377
|
+
/**
|
|
378
|
+
* A local track was published successfully. This event is helpful to know
|
|
379
|
+
* when to update your local UI with the newly published track.
|
|
380
|
+
*
|
|
381
|
+
* args: ([[LocalTrackPublication]])
|
|
382
|
+
*/
|
|
383
|
+
LocalTrackPublished = "localTrackPublished",
|
|
384
|
+
/**
|
|
385
|
+
* A local track was unpublished. This event is helpful to know when to remove
|
|
386
|
+
* the local track from your UI.
|
|
387
|
+
*
|
|
388
|
+
* When a user stops sharing their screen by pressing "End" on the browser UI,
|
|
389
|
+
* this event will also fire.
|
|
390
|
+
*
|
|
391
|
+
* args: ([[LocalTrackPublication]])
|
|
392
|
+
*/
|
|
393
|
+
LocalTrackUnpublished = "localTrackUnpublished",
|
|
394
|
+
/**
|
|
395
|
+
* A local track has been constrained by cpu.
|
|
396
|
+
* This event is useful to know when to reduce the capture resolution of the track.
|
|
397
|
+
*
|
|
398
|
+
* This event is emitted on the local participant.
|
|
399
|
+
*
|
|
400
|
+
* args: ([[LocalVideoTrack]], [[LocalTrackPublication]])
|
|
401
|
+
*/
|
|
402
|
+
LocalTrackCpuConstrained = "localTrackCpuConstrained",
|
|
403
|
+
/**
|
|
404
|
+
* @internal
|
|
405
|
+
*/
|
|
406
|
+
LocalSenderCreated = "localSenderCreated",
|
|
407
|
+
/**
|
|
408
|
+
* Participant metadata is a simple way for app-specific state to be pushed to
|
|
409
|
+
* all users.
|
|
410
|
+
* When RoomService.UpdateParticipantMetadata is called to change a participant's
|
|
411
|
+
* state, *all* participants in the room will fire this event.
|
|
412
|
+
* To access the current metadata, see [[Participant.metadata]].
|
|
413
|
+
*
|
|
414
|
+
* args: (prevMetadata: string)
|
|
415
|
+
*
|
|
416
|
+
*/
|
|
417
|
+
ParticipantMetadataChanged = "participantMetadataChanged",
|
|
418
|
+
/**
|
|
419
|
+
* Participant's display name changed
|
|
420
|
+
*
|
|
421
|
+
* args: (name: string, [[Participant]])
|
|
422
|
+
*
|
|
423
|
+
*/
|
|
424
|
+
ParticipantNameChanged = "participantNameChanged",
|
|
425
|
+
/**
|
|
426
|
+
* Data received from this participant as sender.
|
|
427
|
+
* Data packets provides the ability to use LiveKit to send/receive arbitrary payloads.
|
|
428
|
+
* All participants in the room will receive the messages sent to the room.
|
|
429
|
+
*
|
|
430
|
+
* args: (payload: NonSharedUint8Array, kind: [[DataPacket_Kind]])
|
|
431
|
+
*/
|
|
432
|
+
DataReceived = "dataReceived",
|
|
433
|
+
/**
|
|
434
|
+
* SIP DTMF tones received from this participant as sender.
|
|
435
|
+
*
|
|
436
|
+
* args: (dtmf: [[DataPacket_Kind]])
|
|
437
|
+
*/
|
|
438
|
+
SipDTMFReceived = "sipDTMFReceived",
|
|
439
|
+
/**
|
|
440
|
+
* Transcription received from this participant as data source.
|
|
441
|
+
* @beta
|
|
442
|
+
*/
|
|
443
|
+
TranscriptionReceived = "transcriptionReceived",
|
|
444
|
+
/**
|
|
445
|
+
* Has speaking status changed for the current participant
|
|
446
|
+
*
|
|
447
|
+
* args: (speaking: boolean)
|
|
448
|
+
*/
|
|
449
|
+
IsSpeakingChanged = "isSpeakingChanged",
|
|
450
|
+
/**
|
|
451
|
+
* Connection quality was changed for a Participant. It'll receive updates
|
|
452
|
+
* from the local participant, as well as any [[RemoteParticipant]]s that we are
|
|
453
|
+
* subscribed to.
|
|
454
|
+
*
|
|
455
|
+
* args: (connectionQuality: [[ConnectionQuality]])
|
|
456
|
+
*/
|
|
457
|
+
ConnectionQualityChanged = "connectionQualityChanged",
|
|
458
|
+
/**
|
|
459
|
+
* StreamState indicates if a subscribed track has been paused by the SFU
|
|
460
|
+
* (typically this happens because of subscriber's bandwidth constraints)
|
|
461
|
+
*
|
|
462
|
+
* When bandwidth conditions allow, the track will be resumed automatically.
|
|
463
|
+
* TrackStreamStateChanged will also be emitted when that happens.
|
|
464
|
+
*
|
|
465
|
+
* args: (pub: [[RemoteTrackPublication]], streamState: [[Track.StreamState]])
|
|
466
|
+
*/
|
|
467
|
+
TrackStreamStateChanged = "trackStreamStateChanged",
|
|
468
|
+
/**
|
|
469
|
+
* One of subscribed tracks have changed its permissions for the current
|
|
470
|
+
* participant. If permission was revoked, then the track will no longer
|
|
471
|
+
* be subscribed. If permission was granted, a TrackSubscribed event will
|
|
472
|
+
* be emitted.
|
|
473
|
+
*
|
|
474
|
+
* args: (pub: [[RemoteTrackPublication]],
|
|
475
|
+
* status: [[TrackPublication.SubscriptionStatus]])
|
|
476
|
+
*/
|
|
477
|
+
TrackSubscriptionPermissionChanged = "trackSubscriptionPermissionChanged",
|
|
478
|
+
/**
|
|
479
|
+
* One of the remote participants publications has changed its subscription status.
|
|
480
|
+
*
|
|
481
|
+
*/
|
|
482
|
+
TrackSubscriptionStatusChanged = "trackSubscriptionStatusChanged",
|
|
483
|
+
/**
|
|
484
|
+
* a local track has been constrained by cpu
|
|
485
|
+
*/
|
|
486
|
+
TrackCpuConstrained = "trackCpuConstrained",
|
|
487
|
+
/** @internal */
|
|
488
|
+
MediaDevicesError = "mediaDevicesError",
|
|
489
|
+
/** @internal */
|
|
490
|
+
AudioStreamAcquired = "audioStreamAcquired",
|
|
491
|
+
/**
|
|
492
|
+
* A participant's permission has changed.
|
|
493
|
+
* args: (prevPermissions: [[ParticipantPermission]])
|
|
494
|
+
*/
|
|
495
|
+
ParticipantPermissionsChanged = "participantPermissionsChanged",
|
|
496
|
+
/** @internal */
|
|
497
|
+
PCTrackAdded = "pcTrackAdded",
|
|
498
|
+
/**
|
|
499
|
+
* Participant attributes is an app-specific key value state to be pushed to
|
|
500
|
+
* all users.
|
|
501
|
+
* When a participant's attributes changed, this event will be emitted with the changed attributes
|
|
502
|
+
* args: (changedAttributes: [[Record<string, string]])
|
|
503
|
+
*/
|
|
504
|
+
AttributesChanged = "attributesChanged",
|
|
505
|
+
/**
|
|
506
|
+
* fired on local participant only, when the first remote participant has subscribed to the track specified in the payload
|
|
507
|
+
*/
|
|
508
|
+
LocalTrackSubscribed = "localTrackSubscribed",
|
|
509
|
+
/** only emitted on local participant */
|
|
510
|
+
ChatMessage = "chatMessage",
|
|
511
|
+
/**
|
|
512
|
+
* Emitted when the participant's state changes to ACTIVE and is ready to send/receive data messages
|
|
513
|
+
*/
|
|
514
|
+
Active = "active"
|
|
515
|
+
}
|
|
516
|
+
/** @internal */
|
|
517
|
+
export declare enum EngineEvent {
|
|
518
|
+
TransportsCreated = "transportsCreated",
|
|
519
|
+
Connected = "connected",
|
|
520
|
+
Disconnected = "disconnected",
|
|
521
|
+
Resuming = "resuming",
|
|
522
|
+
Resumed = "resumed",
|
|
523
|
+
Restarting = "restarting",
|
|
524
|
+
Restarted = "restarted",
|
|
525
|
+
SignalResumed = "signalResumed",
|
|
526
|
+
SignalRestarted = "signalRestarted",
|
|
527
|
+
Closing = "closing",
|
|
528
|
+
MediaTrackAdded = "mediaTrackAdded",
|
|
529
|
+
ActiveSpeakersUpdate = "activeSpeakersUpdate",
|
|
530
|
+
DataPacketReceived = "dataPacketReceived",
|
|
531
|
+
RTPVideoMapUpdate = "rtpVideoMapUpdate",
|
|
532
|
+
DCBufferStatusChanged = "dcBufferStatusChanged",
|
|
533
|
+
ParticipantUpdate = "participantUpdate",
|
|
534
|
+
RoomUpdate = "roomUpdate",
|
|
535
|
+
SpeakersChanged = "speakersChanged",
|
|
536
|
+
StreamStateChanged = "streamStateChanged",
|
|
537
|
+
ConnectionQualityUpdate = "connectionQualityUpdate",
|
|
538
|
+
SubscriptionError = "subscriptionError",
|
|
539
|
+
SubscriptionPermissionUpdate = "subscriptionPermissionUpdate",
|
|
540
|
+
RemoteMute = "remoteMute",
|
|
541
|
+
SubscribedQualityUpdate = "subscribedQualityUpdate",
|
|
542
|
+
LocalTrackUnpublished = "localTrackUnpublished",
|
|
543
|
+
LocalTrackSubscribed = "localTrackSubscribed",
|
|
544
|
+
Offline = "offline",
|
|
545
|
+
SignalRequestResponse = "signalRequestResponse",
|
|
546
|
+
SignalConnected = "signalConnected",
|
|
547
|
+
RoomMoved = "roomMoved",
|
|
548
|
+
PublishDataTrackResponse = "publishDataTrackResponse",
|
|
549
|
+
UnPublishDataTrackResponse = "unPublishDataTrackResponse",
|
|
550
|
+
DataTrackSubscriberHandles = "dataTrackSubscriberHandles",
|
|
551
|
+
DataTrackPacketReceived = "dataTrackPacketReceived",
|
|
552
|
+
Joined = "joined",
|
|
553
|
+
TokenRefreshed = "tokenRefreshed",
|
|
554
|
+
ServerRegionsReported = "serverRegionsReported",
|
|
555
|
+
RequestSubscribedCodecRefresh = "requestSubscribedCodecRefresh"
|
|
556
|
+
}
|
|
557
|
+
export declare enum TrackEvent {
|
|
558
|
+
Message = "message",
|
|
559
|
+
Muted = "muted",
|
|
560
|
+
Unmuted = "unmuted",
|
|
561
|
+
/**
|
|
562
|
+
* Only fires on LocalTracks
|
|
563
|
+
*/
|
|
564
|
+
Restarted = "restarted",
|
|
565
|
+
Ended = "ended",
|
|
566
|
+
Subscribed = "subscribed",
|
|
567
|
+
Unsubscribed = "unsubscribed",
|
|
568
|
+
CpuConstrained = "cpuConstrained",
|
|
569
|
+
/** @internal */
|
|
570
|
+
UpdateSettings = "updateSettings",
|
|
571
|
+
/** @internal */
|
|
572
|
+
UpdateSubscription = "updateSubscription",
|
|
573
|
+
/** @internal */
|
|
574
|
+
AudioPlaybackStarted = "audioPlaybackStarted",
|
|
575
|
+
/** @internal */
|
|
576
|
+
AudioPlaybackFailed = "audioPlaybackFailed",
|
|
577
|
+
/**
|
|
578
|
+
* @internal
|
|
579
|
+
* Only fires on LocalAudioTrack instances
|
|
580
|
+
*/
|
|
581
|
+
AudioSilenceDetected = "audioSilenceDetected",
|
|
582
|
+
/** @internal */
|
|
583
|
+
VisibilityChanged = "visibilityChanged",
|
|
584
|
+
/** @internal */
|
|
585
|
+
VideoDimensionsChanged = "videoDimensionsChanged",
|
|
586
|
+
/** @internal */
|
|
587
|
+
VideoPlaybackStarted = "videoPlaybackStarted",
|
|
588
|
+
/** @internal */
|
|
589
|
+
VideoPlaybackFailed = "videoPlaybackFailed",
|
|
590
|
+
/** @internal */
|
|
591
|
+
ElementAttached = "elementAttached",
|
|
592
|
+
/** @internal */
|
|
593
|
+
ElementDetached = "elementDetached",
|
|
594
|
+
/**
|
|
595
|
+
* @internal
|
|
596
|
+
* Only fires on LocalTracks
|
|
597
|
+
*/
|
|
598
|
+
UpstreamPaused = "upstreamPaused",
|
|
599
|
+
/**
|
|
600
|
+
* @internal
|
|
601
|
+
* Only fires on LocalTracks
|
|
602
|
+
*/
|
|
603
|
+
UpstreamResumed = "upstreamResumed",
|
|
604
|
+
/**
|
|
605
|
+
* @internal
|
|
606
|
+
* Fires on RemoteTrackPublication
|
|
607
|
+
*/
|
|
608
|
+
SubscriptionPermissionChanged = "subscriptionPermissionChanged",
|
|
609
|
+
/**
|
|
610
|
+
* Fires on RemoteTrackPublication
|
|
611
|
+
*/
|
|
612
|
+
SubscriptionStatusChanged = "subscriptionStatusChanged",
|
|
613
|
+
/**
|
|
614
|
+
* Fires on RemoteTrackPublication
|
|
615
|
+
*/
|
|
616
|
+
SubscriptionFailed = "subscriptionFailed",
|
|
617
|
+
/**
|
|
618
|
+
* @internal
|
|
619
|
+
*/
|
|
620
|
+
TrackProcessorUpdate = "trackProcessorUpdate",
|
|
621
|
+
/**
|
|
622
|
+
* @internal
|
|
623
|
+
*/
|
|
624
|
+
AudioTrackFeatureUpdate = "audioTrackFeatureUpdate",
|
|
625
|
+
/**
|
|
626
|
+
* @beta
|
|
627
|
+
*/
|
|
628
|
+
TranscriptionReceived = "transcriptionReceived",
|
|
629
|
+
/**
|
|
630
|
+
* @experimental
|
|
631
|
+
*/
|
|
632
|
+
TimeSyncUpdate = "timeSyncUpdate",
|
|
633
|
+
/**
|
|
634
|
+
* @internal
|
|
635
|
+
*/
|
|
636
|
+
PreConnectBufferFlushed = "preConnectBufferFlushed"
|
|
637
|
+
}
|
|
638
|
+
//# sourceMappingURL=events.d.ts.map
|