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
|
override var playingState = State.IDLE
|
||||||
@MainThread
|
@MainThread
|
||||||
set(value) {
|
set(value) {
|
||||||
Timber.w("## VoiceBroadcastPlayer state: $field -> $value")
|
if (field != value) {
|
||||||
field = value
|
Timber.w("## VoiceBroadcastPlayer state: $field -> $value")
|
||||||
onPlayingStateChanged(value)
|
field = value
|
||||||
|
onPlayingStateChanged(value)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Map voiceBroadcastId to listeners.*/
|
/** Map voiceBroadcastId to listeners.*/
|
||||||
@ -299,6 +301,7 @@ class VoiceBroadcastPlayerImpl @Inject constructor(
|
|||||||
playlist.currentSequence = playlist.currentSequence?.inc()
|
playlist.currentSequence = playlist.currentSequence?.inc()
|
||||||
currentMediaPlayer = mp
|
currentMediaPlayer = mp
|
||||||
nextMediaPlayer = null
|
nextMediaPlayer = null
|
||||||
|
playingState = State.PLAYING
|
||||||
prepareNextMediaPlayer()
|
prepareNextMediaPlayer()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user