Skip to content

Commit

Permalink
feat(player): display controller permanently on endscreen
Browse files Browse the repository at this point in the history
  • Loading branch information
FineFindus committed Mar 26, 2024
1 parent c0dac7c commit 6eea7b4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,11 +113,11 @@ import com.github.libretube.util.PlayingQueue
import com.github.libretube.util.TextUtils
import com.github.libretube.util.TextUtils.toTimeInSeconds
import com.github.libretube.util.YoutubeHlsPlaylistParser
import java.util.concurrent.Executors
import kotlin.math.abs
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import kotlinx.coroutines.withContext
import java.util.concurrent.Executors
import kotlin.math.abs

@androidx.annotation.OptIn(androidx.media3.common.util.UnstableApi::class)
class PlayerFragment : Fragment(), OnlinePlayerOptions {
Expand Down Expand Up @@ -313,7 +313,7 @@ class PlayerFragment : Fragment(), OnlinePlayerOptions {
playNextVideo()
}
} else {
binding.player.showController()
binding.player.showControllerPermanently()
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,12 @@ open class CustomExoPlayerView(
super.showController()
}

fun showControllerPermanently() {
// remove the previous callback from the queue to prevent a flashing behavior
cancelHideControllerTask()
super.showController()
}

override fun onTouchEvent(event: MotionEvent) = false

private fun initRewindAndForward() {
Expand Down

0 comments on commit 6eea7b4

Please sign in to comment.