@@ -175,7 +175,7 @@ class AudioPlayerFragment : Fragment(R.layout.fragment_audio_player), AudioPlaye
175175 }
176176
177177 binding.openVideo.setOnClickListener {
178- switchToVideoMode()
178+ switchToVideoMode(PlayingQueue .getCurrent()?.url !! .toID() )
179179 }
180180
181181 childFragmentManager.setFragmentResultListener(
@@ -260,7 +260,7 @@ class AudioPlayerFragment : Fragment(R.layout.fragment_audio_player), AudioPlaye
260260 }
261261 }
262262
263- fun switchToVideoMode () {
263+ fun switchToVideoMode (videoId : String ) {
264264 playerController?.sendCustomCommand(
265265 AbstractPlayerService .runPlayerActionCommand,
266266 bundleOf(PlayerCommand .TOGGLE_AUDIO_ONLY_MODE .name to false )
@@ -270,7 +270,7 @@ class AudioPlayerFragment : Fragment(R.layout.fragment_audio_player), AudioPlaye
270270
271271 NavigationHelper .openVideoPlayerFragment(
272272 context = requireContext(),
273- videoId = PlayingQueue .getCurrent()?.url !! .toID() ,
273+ videoId = videoId ,
274274 alreadyStarted = true ,
275275 )
276276 }
@@ -492,7 +492,7 @@ class AudioPlayerFragment : Fragment(R.layout.fragment_audio_player), AudioPlaye
492492 private fun updateVolume (distance : Float ) {
493493 val bar = binding.volumeProgressBar
494494 binding.volumeControls.apply {
495- if (visibility == View . GONE ) {
495+ if (isGone ) {
496496 isVisible = true
497497 // Volume could be changed using other mediums, sync progress
498498 // bar with new value.
0 commit comments