Skip to content

Commit

Permalink
Merge pull request #6829 from FineFindus/fix/open-player
Browse files Browse the repository at this point in the history
fix: maximise player when playing new video
  • Loading branch information
Bnyro authored Nov 27, 2024
2 parents 386f450 + 0574f85 commit 308ef1a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import com.github.libretube.ui.base.BaseActivity
import com.github.libretube.ui.fragments.AudioPlayerFragment
import com.github.libretube.ui.fragments.PlayerFragment
import com.github.libretube.ui.views.SingleViewTouchableMotionLayout
import com.github.libretube.util.PlayingQueue

object NavigationHelper {
private val handler = Handler(Looper.getMainLooper())
Expand Down Expand Up @@ -70,6 +71,9 @@ object NavigationHelper {
val activity = ContextHelper.unwrapActivity<MainActivity>(context)
val attachedToRunningPlayer = activity.runOnPlayerFragment {
this.playNextVideo(videoUrlOrId.toID())
PlayingQueue.clear()
// maximize player
this.binding.playerMotionLayout.transitionToStart()
true
}
if (attachedToRunningPlayer) return
Expand Down

0 comments on commit 308ef1a

Please sign in to comment.