livekit-client 0.15.3 → 0.16.2
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/dist/api/SignalClient.d.ts +6 -3
- package/dist/api/SignalClient.js +70 -28
- package/dist/api/SignalClient.js.map +1 -1
- package/dist/options.d.ts +5 -0
- package/dist/proto/livekit_models.d.ts +30 -0
- package/dist/proto/livekit_models.js +219 -1
- package/dist/proto/livekit_models.js.map +1 -1
- package/dist/proto/livekit_rtc.d.ts +15 -10
- package/dist/proto/livekit_rtc.js +36 -22
- package/dist/proto/livekit_rtc.js.map +1 -1
- package/dist/room/RTCEngine.d.ts +11 -2
- package/dist/room/RTCEngine.js +196 -44
- package/dist/room/RTCEngine.js.map +1 -1
- package/dist/room/Room.d.ts +7 -0
- package/dist/room/Room.js +70 -16
- package/dist/room/Room.js.map +1 -1
- package/dist/room/events.d.ts +5 -3
- package/dist/room/events.js +5 -3
- package/dist/room/events.js.map +1 -1
- package/dist/room/participant/LocalParticipant.d.ts +1 -2
- package/dist/room/participant/LocalParticipant.js +7 -6
- package/dist/room/participant/LocalParticipant.js.map +1 -1
- package/dist/room/participant/RemoteParticipant.js +3 -0
- package/dist/room/participant/RemoteParticipant.js.map +1 -1
- package/dist/room/participant/publishUtils.js +1 -1
- package/dist/room/participant/publishUtils.js.map +1 -1
- package/dist/room/participant/publishUtils.test.js +9 -0
- package/dist/room/participant/publishUtils.test.js.map +1 -1
- package/dist/room/track/LocalTrackPublication.d.ts +2 -0
- package/dist/room/track/LocalTrackPublication.js.map +1 -1
- package/dist/room/track/RemoteTrackPublication.d.ts +2 -1
- package/dist/room/track/RemoteTrackPublication.js +22 -8
- package/dist/room/track/RemoteTrackPublication.js.map +1 -1
- package/dist/room/track/RemoteVideoTrack.js +12 -7
- package/dist/room/track/RemoteVideoTrack.js.map +1 -1
- package/dist/room/track/Track.js +28 -20
- package/dist/room/track/Track.js.map +1 -1
- package/dist/room/track/create.js +5 -0
- package/dist/room/track/create.js.map +1 -1
- package/dist/room/utils.d.ts +3 -0
- package/dist/room/utils.js +16 -1
- package/dist/room/utils.js.map +1 -1
- package/dist/version.d.ts +2 -2
- package/dist/version.js +2 -2
- package/package.json +3 -3
- package/src/api/SignalClient.ts +444 -0
- package/src/connect.ts +100 -0
- package/src/index.ts +47 -0
- package/src/logger.ts +22 -0
- package/src/options.ts +152 -0
- package/src/proto/livekit_models.ts +1863 -0
- package/src/proto/livekit_rtc.ts +3415 -0
- package/src/room/DeviceManager.ts +57 -0
- package/src/room/PCTransport.ts +86 -0
- package/src/room/RTCEngine.ts +598 -0
- package/src/room/Room.ts +840 -0
- package/src/room/errors.ts +65 -0
- package/src/room/events.ts +398 -0
- package/src/room/participant/LocalParticipant.ts +685 -0
- package/src/room/participant/Participant.ts +214 -0
- package/src/room/participant/ParticipantTrackPermission.ts +32 -0
- package/src/room/participant/RemoteParticipant.ts +241 -0
- package/src/room/participant/publishUtils.test.ts +105 -0
- package/src/room/participant/publishUtils.ts +180 -0
- package/src/room/stats.ts +130 -0
- package/src/room/track/LocalAudioTrack.ts +112 -0
- package/src/room/track/LocalTrack.ts +124 -0
- package/src/room/track/LocalTrackPublication.ts +66 -0
- package/src/room/track/LocalVideoTrack.test.ts +70 -0
- package/src/room/track/LocalVideoTrack.ts +416 -0
- package/src/room/track/RemoteAudioTrack.ts +58 -0
- package/src/room/track/RemoteTrack.ts +59 -0
- package/src/room/track/RemoteTrackPublication.ts +198 -0
- package/src/room/track/RemoteVideoTrack.ts +220 -0
- package/src/room/track/Track.ts +307 -0
- package/src/room/track/TrackPublication.ts +120 -0
- package/src/room/track/create.ts +120 -0
- package/src/room/track/defaults.ts +23 -0
- package/src/room/track/options.ts +229 -0
- package/src/room/track/types.ts +8 -0
- package/src/room/track/utils.test.ts +93 -0
- package/src/room/track/utils.ts +76 -0
- package/src/room/utils.ts +62 -0
- package/src/version.ts +2 -0
- package/.github/workflows/publish.yaml +0 -55
- package/.github/workflows/test.yaml +0 -36
- package/example/index.html +0 -247
- package/example/sample.ts +0 -632
- package/example/styles.css +0 -144
- package/example/webpack.config.js +0 -33
@@ -0,0 +1,65 @@
|
|
1
|
+
export class LivekitError extends Error {
|
2
|
+
code: number;
|
3
|
+
|
4
|
+
constructor(code: number, message?: string) {
|
5
|
+
super(message || 'an error has occured');
|
6
|
+
this.code = code;
|
7
|
+
}
|
8
|
+
}
|
9
|
+
|
10
|
+
export class ConnectionError extends LivekitError {
|
11
|
+
constructor(message?: string) {
|
12
|
+
super(1, message);
|
13
|
+
}
|
14
|
+
}
|
15
|
+
|
16
|
+
export class TrackInvalidError extends LivekitError {
|
17
|
+
constructor(message?: string) {
|
18
|
+
super(20, message || 'Track is invalid');
|
19
|
+
}
|
20
|
+
}
|
21
|
+
|
22
|
+
export class UnsupportedServer extends LivekitError {
|
23
|
+
constructor(message?: string) {
|
24
|
+
super(10, message || 'Unsupported server');
|
25
|
+
}
|
26
|
+
}
|
27
|
+
|
28
|
+
export class UnexpectedConnectionState extends LivekitError {
|
29
|
+
constructor(message?: string) {
|
30
|
+
super(12, message || 'Unexpected connection state');
|
31
|
+
}
|
32
|
+
}
|
33
|
+
|
34
|
+
export class PublishDataError extends LivekitError {
|
35
|
+
constructor(message?: string) {
|
36
|
+
super(13, message || 'Unable to publish data');
|
37
|
+
}
|
38
|
+
}
|
39
|
+
|
40
|
+
export enum MediaDeviceFailure {
|
41
|
+
// user rejected permissions
|
42
|
+
PermissionDenied = 'PermissionDenied',
|
43
|
+
// device is not available
|
44
|
+
NotFound = 'NotFound',
|
45
|
+
// device is in use. On Windows, only a single tab may get access to a device at a time.
|
46
|
+
DeviceInUse = 'DeviceInUse',
|
47
|
+
Other = 'Other',
|
48
|
+
}
|
49
|
+
|
50
|
+
export namespace MediaDeviceFailure {
|
51
|
+
export function getFailure(error: any): MediaDeviceFailure | undefined {
|
52
|
+
if (error && 'name' in error) {
|
53
|
+
if (error.name === 'NotFoundError' || error.name === 'DevicesNotFoundError') {
|
54
|
+
return MediaDeviceFailure.NotFound;
|
55
|
+
}
|
56
|
+
if (error.name === 'NotAllowedError' || error.name === 'PermissionDeniedError') {
|
57
|
+
return MediaDeviceFailure.PermissionDenied;
|
58
|
+
}
|
59
|
+
if (error.name === 'NotReadableError' || error.name === 'TrackStartError') {
|
60
|
+
return MediaDeviceFailure.DeviceInUse;
|
61
|
+
}
|
62
|
+
return MediaDeviceFailure.Other;
|
63
|
+
}
|
64
|
+
}
|
65
|
+
}
|
@@ -0,0 +1,398 @@
|
|
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 enum RoomEvent {
|
11
|
+
/**
|
12
|
+
* When the connection to the server has been interrupted and it's attempting
|
13
|
+
* to reconnect.
|
14
|
+
*/
|
15
|
+
Reconnecting = 'reconnecting',
|
16
|
+
|
17
|
+
/**
|
18
|
+
* Fires when a reconnection has been successful.
|
19
|
+
*/
|
20
|
+
Reconnected = 'reconnected',
|
21
|
+
|
22
|
+
/**
|
23
|
+
* When disconnected from room. This fires when room.disconnect() is called or
|
24
|
+
* when an unrecoverable connection issue had occured
|
25
|
+
*/
|
26
|
+
Disconnected = 'disconnected',
|
27
|
+
|
28
|
+
/**
|
29
|
+
* When input or output devices on the machine have changed.
|
30
|
+
*/
|
31
|
+
MediaDevicesChanged = 'mediaDevicesChanged',
|
32
|
+
|
33
|
+
/**
|
34
|
+
* When a [[RemoteParticipant]] joins *after* the local
|
35
|
+
* participant. It will not emit events for participants that are already
|
36
|
+
* in the room
|
37
|
+
*
|
38
|
+
* args: ([[RemoteParticipant]])
|
39
|
+
*/
|
40
|
+
ParticipantConnected = 'participantConnected',
|
41
|
+
|
42
|
+
/**
|
43
|
+
* When a [[RemoteParticipant]] leaves *after* the local
|
44
|
+
* participant has joined.
|
45
|
+
*
|
46
|
+
* args: ([[RemoteParticipant]])
|
47
|
+
*/
|
48
|
+
ParticipantDisconnected = 'participantDisconnected',
|
49
|
+
|
50
|
+
/**
|
51
|
+
* When a new track is published to room *after* the local
|
52
|
+
* participant has joined. It will not fire for tracks that are already published.
|
53
|
+
*
|
54
|
+
* A track published doesn't mean the participant has subscribed to it. It's
|
55
|
+
* simply reflecting the state of the room.
|
56
|
+
*
|
57
|
+
* args: ([[RemoteTrackPublication]], [[RemoteParticipant]])
|
58
|
+
*/
|
59
|
+
TrackPublished = 'trackPublished',
|
60
|
+
|
61
|
+
/**
|
62
|
+
* The [[LocalParticipant]] has subscribed to a new track. This event will **always**
|
63
|
+
* fire as long as new tracks are ready for use.
|
64
|
+
*
|
65
|
+
* args: ([[RemoteTrack]], [[RemoteTrackPublication]], [[RemoteParticipant]])
|
66
|
+
*/
|
67
|
+
TrackSubscribed = 'trackSubscribed',
|
68
|
+
|
69
|
+
/**
|
70
|
+
* Could not subscribe to a track
|
71
|
+
*
|
72
|
+
* args: (track sid, [[RemoteParticipant]])
|
73
|
+
*/
|
74
|
+
TrackSubscriptionFailed = 'trackSubscriptionFailed',
|
75
|
+
|
76
|
+
/**
|
77
|
+
* A [[RemoteParticipant]] has unpublished a track
|
78
|
+
*
|
79
|
+
* args: ([[RemoteTrackPublication]], [[RemoteParticipant]])
|
80
|
+
*/
|
81
|
+
TrackUnpublished = 'trackUnpublished',
|
82
|
+
|
83
|
+
/**
|
84
|
+
* A subscribed track is no longer available. Clients should listen to this
|
85
|
+
* event and ensure they detach tracks.
|
86
|
+
*
|
87
|
+
* args: ([[Track]], [[RemoteTrackPublication]], [[RemoteParticipant]])
|
88
|
+
*/
|
89
|
+
TrackUnsubscribed = 'trackUnsubscribed',
|
90
|
+
|
91
|
+
/**
|
92
|
+
* A track that was muted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
|
93
|
+
*
|
94
|
+
* args: ([[TrackPublication]], [[Participant]])
|
95
|
+
*/
|
96
|
+
TrackMuted = 'trackMuted',
|
97
|
+
|
98
|
+
/**
|
99
|
+
* A track that was unmuted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
|
100
|
+
*
|
101
|
+
* args: ([[TrackPublication]], [[Participant]])
|
102
|
+
*/
|
103
|
+
TrackUnmuted = 'trackUnmuted',
|
104
|
+
|
105
|
+
/**
|
106
|
+
* A local track was published successfully. This event is helpful to know
|
107
|
+
* when to update your local UI with the newly published track.
|
108
|
+
*
|
109
|
+
* args: ([[LocalTrackPublication]], [[LocalParticipant]])
|
110
|
+
*/
|
111
|
+
LocalTrackPublished = 'localTrackPublished',
|
112
|
+
|
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
|
+
/**
|
125
|
+
* Active speakers changed. List of speakers are ordered by their audio level.
|
126
|
+
* loudest speakers first. This will include the LocalParticipant too.
|
127
|
+
*
|
128
|
+
* Speaker updates are sent only to the publishing participant and their subscribers.
|
129
|
+
*
|
130
|
+
* args: (Array<[[Participant]]>)
|
131
|
+
*/
|
132
|
+
ActiveSpeakersChanged = 'activeSpeakersChanged',
|
133
|
+
|
134
|
+
/**
|
135
|
+
* @deprecated Use ParticipantMetadataChanged instead
|
136
|
+
* @internal
|
137
|
+
*/
|
138
|
+
MetadataChanged = 'metadataChanged',
|
139
|
+
|
140
|
+
/**
|
141
|
+
* Participant metadata is a simple way for app-specific state to be pushed to
|
142
|
+
* all users.
|
143
|
+
* When RoomService.UpdateParticipantMetadata is called to change a participant's
|
144
|
+
* state, *all* participants in the room will fire this event.
|
145
|
+
*
|
146
|
+
* args: (prevMetadata: string, [[Participant]])
|
147
|
+
*
|
148
|
+
*/
|
149
|
+
ParticipantMetadataChanged = 'participantMetaDataChanged',
|
150
|
+
|
151
|
+
/**
|
152
|
+
* Room metadata is a simple way for app-specific state to be pushed to
|
153
|
+
* all users.
|
154
|
+
* When RoomService.UpdateRoomMetadata is called to change a room's state,
|
155
|
+
* *all* participants in the room will fire this event.
|
156
|
+
*
|
157
|
+
* args: (string)
|
158
|
+
*/
|
159
|
+
RoomMetadataChanged = 'roomMetadataChanged',
|
160
|
+
|
161
|
+
/**
|
162
|
+
* Data received from another participant.
|
163
|
+
* Data packets provides the ability to use LiveKit to send/receive arbitrary payloads.
|
164
|
+
* All participants in the room will receive the messages sent to the room.
|
165
|
+
*
|
166
|
+
* args: (payload: Uint8Array, participant: [[Participant]], kind: [[DataPacket_Kind]])
|
167
|
+
*/
|
168
|
+
DataReceived = 'dataReceived',
|
169
|
+
|
170
|
+
/**
|
171
|
+
* Connection quality was changed for a Participant. It'll receive updates
|
172
|
+
* from the local participant, as well as any [[RemoteParticipant]]s that we are
|
173
|
+
* subscribed to.
|
174
|
+
*
|
175
|
+
* args: (connectionQuality: [[ConnectionQuality]], participant: [[Participant]])
|
176
|
+
*/
|
177
|
+
ConnectionQualityChanged = 'connectionQualityChanged',
|
178
|
+
|
179
|
+
/**
|
180
|
+
* StreamState indicates if a subscribed track has been paused by the SFU
|
181
|
+
* (typically this happens because of subscriber's bandwidth constraints)
|
182
|
+
*
|
183
|
+
* When bandwidth conditions allow, the track will be resumed automatically.
|
184
|
+
* TrackStreamStateChanged will also be emitted when that happens.
|
185
|
+
*
|
186
|
+
* args: (pub: [[RemoteTrackPublication]], streamState: [[Track.StreamState]],
|
187
|
+
* participant: [[RemoteParticipant]])
|
188
|
+
*/
|
189
|
+
TrackStreamStateChanged = 'trackStreamStateChanged',
|
190
|
+
|
191
|
+
/**
|
192
|
+
* One of subscribed tracks have changed its permissions for the current
|
193
|
+
* participant. If permission was revoked, then the track will no longer
|
194
|
+
* be subscribed. If permission was granted, a TrackSubscribed event will
|
195
|
+
* be emitted.
|
196
|
+
*
|
197
|
+
* args: (pub: [[RemoteTrackPublication]],
|
198
|
+
* status: [[TrackPublication.SubscriptionStatus]],
|
199
|
+
* participant: [[RemoteParticipant]])
|
200
|
+
*/
|
201
|
+
TrackSubscriptionPermissionChanged = 'trackSubscriptionPermissionChanged',
|
202
|
+
|
203
|
+
/**
|
204
|
+
* LiveKit will attempt to autoplay all audio tracks when you attach them to
|
205
|
+
* audio elements. However, if that fails, we'll notify you via AudioPlaybackStatusChanged.
|
206
|
+
* `Room.canPlayAudio` will indicate if audio playback is permitted.
|
207
|
+
*/
|
208
|
+
AudioPlaybackStatusChanged = 'audioPlaybackChanged',
|
209
|
+
|
210
|
+
/**
|
211
|
+
* When we have encountered an error while attempting to create a track.
|
212
|
+
* The errors take place in getUserMedia().
|
213
|
+
* Use MediaDeviceFailure.getFailure(error) to get the reason of failure.
|
214
|
+
* [[getAudioCreateError]] and [[getVideoCreateError]] will indicate if it had
|
215
|
+
* an error while creating the audio or video track respectively.
|
216
|
+
*
|
217
|
+
* args: (error: Error)
|
218
|
+
*/
|
219
|
+
MediaDevicesError = 'mediaDevicesError',
|
220
|
+
}
|
221
|
+
|
222
|
+
export enum ParticipantEvent {
|
223
|
+
/**
|
224
|
+
* When a new track is published to room *after* the local
|
225
|
+
* participant has joined. It will not fire for tracks that are already published.
|
226
|
+
*
|
227
|
+
* A track published doesn't mean the participant has subscribed to it. It's
|
228
|
+
* simply reflecting the state of the room.
|
229
|
+
*
|
230
|
+
* args: ([[RemoteTrackPublication]])
|
231
|
+
*/
|
232
|
+
TrackPublished = 'trackPublished',
|
233
|
+
|
234
|
+
/**
|
235
|
+
* Successfully subscribed to the [[RemoteParticipant]]'s track.
|
236
|
+
* This event will **always** fire as long as new tracks are ready for use.
|
237
|
+
*
|
238
|
+
* args: ([[RemoteTrack]], [[RemoteTrackPublication]])
|
239
|
+
*/
|
240
|
+
TrackSubscribed = 'trackSubscribed',
|
241
|
+
|
242
|
+
/**
|
243
|
+
* Could not subscribe to a track
|
244
|
+
*
|
245
|
+
* args: (track sid)
|
246
|
+
*/
|
247
|
+
TrackSubscriptionFailed = 'trackSubscriptionFailed',
|
248
|
+
|
249
|
+
/**
|
250
|
+
* A [[RemoteParticipant]] has unpublished a track
|
251
|
+
*
|
252
|
+
* args: ([[RemoteTrackPublication]])
|
253
|
+
*/
|
254
|
+
TrackUnpublished = 'trackUnpublished',
|
255
|
+
|
256
|
+
/**
|
257
|
+
* A subscribed track is no longer available. Clients should listen to this
|
258
|
+
* event and ensure they detach tracks.
|
259
|
+
*
|
260
|
+
* args: ([[RemoteTrack]], [[RemoteTrackPublication]])
|
261
|
+
*/
|
262
|
+
TrackUnsubscribed = 'trackUnsubscribed',
|
263
|
+
|
264
|
+
/**
|
265
|
+
* A track that was muted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
|
266
|
+
*
|
267
|
+
* args: ([[TrackPublication]])
|
268
|
+
*/
|
269
|
+
TrackMuted = 'trackMuted',
|
270
|
+
|
271
|
+
/**
|
272
|
+
* A track that was unmuted, fires on both [[RemoteParticipant]]s and [[LocalParticipant]]
|
273
|
+
*
|
274
|
+
* args: ([[TrackPublication]])
|
275
|
+
*/
|
276
|
+
TrackUnmuted = 'trackUnmuted',
|
277
|
+
|
278
|
+
/**
|
279
|
+
* A local track was published successfully. This event is helpful to know
|
280
|
+
* when to update your local UI with the newly published track.
|
281
|
+
*
|
282
|
+
* args: ([[LocalTrackPublication]])
|
283
|
+
*/
|
284
|
+
LocalTrackPublished = 'localTrackPublished',
|
285
|
+
|
286
|
+
/**
|
287
|
+
* A local track was unpublished. This event is helpful to know when to remove
|
288
|
+
* the local track from your UI.
|
289
|
+
*
|
290
|
+
* When a user stops sharing their screen by pressing "End" on the browser UI,
|
291
|
+
* this event will also fire.
|
292
|
+
*
|
293
|
+
* args: ([[LocalTrackPublication]])
|
294
|
+
*/
|
295
|
+
LocalTrackUnpublished = 'localTrackUnpublished',
|
296
|
+
|
297
|
+
/**
|
298
|
+
* @deprecated Use ParticipantMetadataChanged instead
|
299
|
+
* @internal
|
300
|
+
*/
|
301
|
+
MetadataChanged = 'metadataChanged',
|
302
|
+
|
303
|
+
/**
|
304
|
+
* Participant metadata is a simple way for app-specific state to be pushed to
|
305
|
+
* all users.
|
306
|
+
* When RoomService.UpdateParticipantMetadata is called to change a participant's
|
307
|
+
* state, *all* participants in the room will fire this event.
|
308
|
+
* To access the current metadata, see [[Participant.metadata]].
|
309
|
+
*
|
310
|
+
* args: (prevMetadata: string)
|
311
|
+
*
|
312
|
+
*/
|
313
|
+
ParticipantMetadataChanged = 'participantMetadataChanged',
|
314
|
+
|
315
|
+
/**
|
316
|
+
* Data received from this participant as sender.
|
317
|
+
* Data packets provides the ability to use LiveKit to send/receive arbitrary payloads.
|
318
|
+
* All participants in the room will receive the messages sent to the room.
|
319
|
+
*
|
320
|
+
* args: (payload: Uint8Array, kind: [[DataPacket_Kind]])
|
321
|
+
*/
|
322
|
+
DataReceived = 'dataReceived',
|
323
|
+
|
324
|
+
/**
|
325
|
+
* Has speaking status changed for the current participant
|
326
|
+
*
|
327
|
+
* args: (speaking: boolean)
|
328
|
+
*/
|
329
|
+
IsSpeakingChanged = 'isSpeakingChanged',
|
330
|
+
|
331
|
+
/**
|
332
|
+
* Connection quality was changed for a Participant. It'll receive updates
|
333
|
+
* from the local participant, as well as any [[RemoteParticipant]]s that we are
|
334
|
+
* subscribed to.
|
335
|
+
*
|
336
|
+
* args: (connectionQuality: [[ConnectionQuality]])
|
337
|
+
*/
|
338
|
+
ConnectionQualityChanged = 'connectionQualityChanged',
|
339
|
+
|
340
|
+
/**
|
341
|
+
* StreamState indicates if a subscribed track has been paused by the SFU
|
342
|
+
* (typically this happens because of subscriber's bandwidth constraints)
|
343
|
+
*
|
344
|
+
* When bandwidth conditions allow, the track will be resumed automatically.
|
345
|
+
* TrackStreamStateChanged will also be emitted when that happens.
|
346
|
+
*
|
347
|
+
* args: (pub: [[RemoteTrackPublication]], streamState: [[Track.StreamState]])
|
348
|
+
*/
|
349
|
+
TrackStreamStateChanged = 'trackStreamStateChanged',
|
350
|
+
|
351
|
+
/**
|
352
|
+
* One of subscribed tracks have changed its permissions for the current
|
353
|
+
* participant. If permission was revoked, then the track will no longer
|
354
|
+
* be subscribed. If permission was granted, a TrackSubscribed event will
|
355
|
+
* be emitted.
|
356
|
+
*
|
357
|
+
* args: (pub: [[RemoteTrackPublication]],
|
358
|
+
* status: [[TrackPublication.SubscriptionStatus]])
|
359
|
+
*/
|
360
|
+
TrackSubscriptionPermissionChanged = 'trackSubscriptionPermissionChanged',
|
361
|
+
|
362
|
+
// fired only on LocalParticipant
|
363
|
+
/** @internal */
|
364
|
+
MediaDevicesError = 'mediaDevicesError',
|
365
|
+
}
|
366
|
+
|
367
|
+
/** @internal */
|
368
|
+
export enum EngineEvent {
|
369
|
+
Connected = 'connected',
|
370
|
+
Disconnected = 'disconnected',
|
371
|
+
Resuming = 'resuming',
|
372
|
+
Resumed = 'resumed',
|
373
|
+
Restarting = 'restarting',
|
374
|
+
Restarted = 'restarted',
|
375
|
+
SignalResumed = 'signalResumed',
|
376
|
+
MediaTrackAdded = 'mediaTrackAdded',
|
377
|
+
ActiveSpeakersUpdate = 'activeSpeakersUpdate',
|
378
|
+
DataPacketReceived = 'dataPacketReceived',
|
379
|
+
}
|
380
|
+
|
381
|
+
export enum TrackEvent {
|
382
|
+
Message = 'message',
|
383
|
+
Muted = 'muted',
|
384
|
+
Unmuted = 'unmuted',
|
385
|
+
Ended = 'ended',
|
386
|
+
/** @internal */
|
387
|
+
UpdateSettings = 'updateSettings',
|
388
|
+
/** @internal */
|
389
|
+
UpdateSubscription = 'updateSubscription',
|
390
|
+
/** @internal */
|
391
|
+
AudioPlaybackStarted = 'audioPlaybackStarted',
|
392
|
+
/** @internal */
|
393
|
+
AudioPlaybackFailed = 'audioPlaybackFailed',
|
394
|
+
/** @internal */
|
395
|
+
VisibilityChanged = 'visibilityChanged',
|
396
|
+
/** @internal */
|
397
|
+
VideoDimensionsChanged = 'videoDimensionsChanged',
|
398
|
+
}
|