We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8a2f28b commit 169c9b2Copy full SHA for 169c9b2
vector/src/main/java/im/vector/app/features/voicebroadcast/listening/VoiceBroadcastPlayerImpl.kt
@@ -436,7 +436,11 @@ class VoiceBroadcastPlayerImpl @Inject constructor(
436
override fun onCompletion(mp: MediaPlayer) {
437
// Release media player as soon as it completed
438
mp.release()
439
- currentMediaPlayer = null
+ if (currentMediaPlayer == mp) {
440
+ currentMediaPlayer = null
441
+ } else {
442
+ error("The media player which has completed mismatches the current media player instance.")
443
+ }
444
445
// Next media player is already attached to this player and will start playing automatically
446
if (nextMediaPlayer != null) return
0 commit comments