Fix unexpected audio queue behavior

This commit is contained in:
Bnyro 2023-01-16 18:33:11 +01:00
parent 2f10b7ba23
commit 4e978faea3

View File

@ -169,6 +169,9 @@ class BackgroundMode : Service() {
/** /**
* Gets the video data and prepares the [player]. * Gets the video data and prepares the [player].
* @param videoId The id of the video to play
* @param seekToPosition The position of the video to seek to
* @param keepQueue Whether to keep the queue or clear it instead
*/ */
private fun loadAudio( private fun loadAudio(
videoId: String, videoId: String,
@ -298,7 +301,7 @@ class BackgroundMode : Service() {
this.videoId = nextVideo this.videoId = nextVideo
this.streams = null this.streams = null
this.segmentData = null this.segmentData = null
loadAudio(videoId) loadAudio(videoId, keepQueue = true)
} }
/** /**