mirror of
https://github.com/libre-tube/LibreTube.git
synced 2024-12-13 22:00:30 +05:30
Merge pull request #6853 from Bnyro/master
fix: crash when trying to start audio before playback started
This commit is contained in:
commit
e4bbd51ef0
@ -741,10 +741,12 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun playOnBackground() {
|
private fun playOnBackground() {
|
||||||
|
val currentPosition = if (::playerController.isInitialized) playerController.currentPosition else 0
|
||||||
|
|
||||||
BackgroundHelper.playOnBackground(
|
BackgroundHelper.playOnBackground(
|
||||||
requireContext(),
|
requireContext(),
|
||||||
videoId,
|
videoId,
|
||||||
playerController.currentPosition,
|
currentPosition,
|
||||||
playlistId,
|
playlistId,
|
||||||
channelId,
|
channelId,
|
||||||
keepQueue = true,
|
keepQueue = true,
|
||||||
|
Loading…
Reference in New Issue
Block a user