File tree 2 files changed +4
-1
lines changed
vector/src/main/java/im/vector/app/features/voicebroadcast/listening
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change
1
+ [Voice Broadcast] Stop listening if we reach the last received chunk and there is no last sequence number
Original file line number Diff line number Diff line change @@ -419,7 +419,9 @@ class VoiceBroadcastPlayerImpl @Inject constructor(
419
419
// Next media player is already attached to this player and will start playing automatically
420
420
if (nextMediaPlayer != null ) return
421
421
422
- val hasEnded = ! isLiveListening && mostRecentVoiceBroadcastEvent?.content?.lastChunkSequence == playlist.currentSequence
422
+ val currentSequence = playlist.currentSequence ? : 0
423
+ val lastChunkSequence = mostRecentVoiceBroadcastEvent?.content?.lastChunkSequence ? : 0
424
+ val hasEnded = ! isLiveListening && currentSequence >= lastChunkSequence
423
425
if (hasEnded) {
424
426
// We'll not receive new chunks anymore so we can stop the live listening
425
427
stop()
You can’t perform that action at this time.
0 commit comments