File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " livekit-client " : patch
3+ ---
4+
5+ Skip incoming track if it's ended
Original file line number Diff line number Diff line change @@ -1421,6 +1421,10 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
14211421 this . log . warn ( 'skipping incoming track after Room disconnected' , this . logContext ) ;
14221422 return ;
14231423 }
1424+ if ( mediaTrack . readyState === 'ended' ) {
1425+ this . log . info ( 'skipping incoming track as it already ended' , this . logContext ) ;
1426+ return ;
1427+ }
14241428 const parts = unpackStreamId ( stream . id ) ;
14251429 const participantSid = parts [ 0 ] ;
14261430 let streamId = parts [ 1 ] ;
@@ -1454,6 +1458,7 @@ class Room extends (EventEmitter as new () => TypedEmitter<RoomEventCallbacks>)
14541458 adaptiveStreamSettings = { } ;
14551459 }
14561460 }
1461+
14571462 participant . addSubscribedMediaTrack (
14581463 mediaTrack ,
14591464 trackId ,
You can’t perform that action at this time.
0 commit comments