mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-22 20:48:00 +01:00
check null exoplayer at skipping
This commit is contained in:
parent
dbdf5b5acd
commit
4c2c330cbc
2 changed files with 8 additions and 0 deletions
|
@ -503,6 +503,10 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen
|
|||
}
|
||||
|
||||
private fun doSkip(forward: Boolean) {
|
||||
if (mExoPlayer == null) {
|
||||
return
|
||||
}
|
||||
|
||||
val curr = mExoPlayer!!.currentPosition
|
||||
val newProgress = if (forward) curr + FAST_FORWARD_VIDEO_MS else curr - FAST_FORWARD_VIDEO_MS
|
||||
val roundProgress = Math.round(newProgress / 1000f)
|
||||
|
|
|
@ -546,6 +546,10 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
|||
}
|
||||
|
||||
private fun doSkip(forward: Boolean) {
|
||||
if (mExoPlayer == null) {
|
||||
return
|
||||
}
|
||||
|
||||
val curr = mExoPlayer!!.currentPosition
|
||||
val newProgress = if (forward) curr + FAST_FORWARD_VIDEO_MS else curr - FAST_FORWARD_VIDEO_MS
|
||||
val roundProgress = Math.round(newProgress / 1000f)
|
||||
|
|
Loading…
Reference in a new issue