partially revert c34b95795f

This commit is contained in:
2022-07-16 13:48:28 +02:00
parent 8eb737a831
commit 4c55bb771f
2 changed files with 76 additions and 2 deletions

View File

@ -385,14 +385,44 @@ class PlayerActivity : AppCompatActivity() {
return (model.currentEpisode.nextEpisodeId != null && !model.currentEpisodeIsLastEpisode())
}
/**
* TODO set position of rewind/fast forward indicators programmatically
*/
private fun rewind() {
model.seekToOffset(rwdTime)
controlsBinding.rwd10.runOnClickAnimation()
// hide/show needed components
playerBinding.exoDoubleTapIndicator.visibility = View.VISIBLE
playerBinding.ffwd10Indicator.visibility = View.INVISIBLE
controlsBinding.rwd10.visibility = View.INVISIBLE
playerBinding.rwd10Indicator.onAnimationEndCallback = {
playerBinding.exoDoubleTapIndicator.visibility = View.GONE
playerBinding.ffwd10Indicator.visibility = View.VISIBLE
controlsBinding.rwd10.visibility = View.VISIBLE
}
// run animation
playerBinding.rwd10Indicator.runOnClickAnimation()
}
private fun fastForward() {
model.seekToOffset(fwdTime)
controlsBinding.ffwd10.runOnClickAnimation()
// hide/show needed components
playerBinding.exoDoubleTapIndicator.visibility = View.VISIBLE
playerBinding.rwd10Indicator.visibility = View.INVISIBLE
controlsBinding.ffwd10.visibility = View.INVISIBLE
playerBinding.ffwd10Indicator.onAnimationEndCallback = {
playerBinding.exoDoubleTapIndicator.visibility = View.GONE
playerBinding.rwd10Indicator.visibility = View.VISIBLE
controlsBinding.ffwd10.visibility = View.VISIBLE
}
// run animation
playerBinding.ffwd10Indicator.runOnClickAnimation()
}
private fun playNextEpisode() {