Merge pull request #6853 from Bnyro/master

fix: crash when trying to start audio before playback started
This commit is contained in:
Bnyro 2024-12-05 20:59:15 +01:00 committed by GitHub
commit e4bbd51ef0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -741,10 +741,12 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
}
private fun playOnBackground() {
val currentPosition = if (::playerController.isInitialized) playerController.currentPosition else 0
BackgroundHelper.playOnBackground(
requireContext(),
videoId,
playerController.currentPosition,
currentPosition,
playlistId,
channelId,
keepQueue = true,