mirror of
https://github.com/vector-im/element-android.git
synced 2024-11-16 02:05:06 +08:00
Improve playing state updates
This commit is contained in:
parent
266236c1e5
commit
a47e3c1233
@ -74,9 +74,11 @@ class VoiceBroadcastPlayerImpl @Inject constructor(
|
||||
override var playingState = State.IDLE
|
||||
@MainThread
|
||||
set(value) {
|
||||
Timber.w("## VoiceBroadcastPlayer state: $field -> $value")
|
||||
field = value
|
||||
onPlayingStateChanged(value)
|
||||
if (field != value) {
|
||||
Timber.w("## VoiceBroadcastPlayer state: $field -> $value")
|
||||
field = value
|
||||
onPlayingStateChanged(value)
|
||||
}
|
||||
}
|
||||
|
||||
/** Map voiceBroadcastId to listeners.*/
|
||||
@ -299,6 +301,7 @@ class VoiceBroadcastPlayerImpl @Inject constructor(
|
||||
playlist.currentSequence = playlist.currentSequence?.inc()
|
||||
currentMediaPlayer = mp
|
||||
nextMediaPlayer = null
|
||||
playingState = State.PLAYING
|
||||
prepareNextMediaPlayer()
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user