File tree Expand file tree Collapse file tree 1 file changed +4
-0
lines changed
vector/src/main/java/im/vector/app/features/voicebroadcast/listening Expand file tree Collapse file tree 1 file changed +4
-0
lines changed Original file line number Diff line number Diff line change @@ -282,6 +282,8 @@ class VoiceBroadcastPlayerImpl @Inject constructor(
282
282
}
283
283
} catch (failure: VoiceBroadcastFailure .ListeningError .DownloadError ) {
284
284
isPreparingNextPlayer = false
285
+ // Do not change the playingState if the current player is still valid,
286
+ // the error will be thrown again when switching to the next player
285
287
if (playingState == State .Buffering || tryOrNull { currentMediaPlayer?.isPlaying } != true ) {
286
288
playingState = State .Error (failure)
287
289
}
@@ -453,6 +455,8 @@ class VoiceBroadcastPlayerImpl @Inject constructor(
453
455
454
456
override fun onError (mp : MediaPlayer , what : Int , extra : Int ): Boolean {
455
457
Timber .d(" ## Voice Broadcast | onError: what=$what , extra=$extra " )
458
+ // Do not change the playingState if the current player is still valid,
459
+ // the error will be thrown again when switching to the next player
456
460
if (playingState == State .Buffering || tryOrNull { currentMediaPlayer?.isPlaying } != true ) {
457
461
playingState = State .Error (VoiceBroadcastFailure .ListeningError .UnableToPlay (what, extra))
458
462
}
You can’t perform that action at this time.
0 commit comments