File tree 4 files changed +11
-0
lines changed
4 files changed +11
-0
lines changed Original file line number Diff line number Diff line change
1
+ ---
2
+ ' livekit-client ' : patch
3
+ ---
4
+
5
+ Track event for track restart
Original file line number Diff line number Diff line change @@ -427,6 +427,10 @@ export enum TrackEvent {
427
427
Message = 'message' ,
428
428
Muted = 'muted' ,
429
429
Unmuted = 'unmuted' ,
430
+ /**
431
+ * Only fires on LocalTracks
432
+ */
433
+ Restarted = 'restarted' ,
430
434
Ended = 'ended' ,
431
435
Subscribed = 'subscribed' ,
432
436
Unsubscribed = 'unsubscribed' ,
Original file line number Diff line number Diff line change @@ -183,6 +183,7 @@ export default abstract class LocalTrack extends Track {
183
183
184
184
this . mediaStream = mediaStream ;
185
185
this . constraints = constraints ;
186
+ this . emit ( TrackEvent . Restarted , this ) ;
186
187
return this ;
187
188
}
188
189
Original file line number Diff line number Diff line change @@ -398,6 +398,7 @@ export type TrackEventCallbacks = {
398
398
message : ( ) => void ;
399
399
muted : ( track ?: any ) => void ;
400
400
unmuted : ( track ?: any ) => void ;
401
+ restarted : ( track ?: any ) => void ;
401
402
ended : ( track ?: any ) => void ;
402
403
updateSettings : ( ) => void ;
403
404
updateSubscription : ( ) => void ;
You can’t perform that action at this time.
0 commit comments