mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 14:37:59 +01:00
add a null check at video fastforwarding
This commit is contained in:
parent
0e60aca74c
commit
44895ae365
1 changed files with 4 additions and 0 deletions
|
@ -471,6 +471,10 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
}
|
||||
|
||||
private fun skip(forward: Boolean) {
|
||||
if (mMediaPlayer == null) {
|
||||
return
|
||||
}
|
||||
|
||||
val curr = mMediaPlayer!!.currentPosition
|
||||
val twoPercents = mMediaPlayer!!.duration / 50
|
||||
val newProgress = if (forward) curr + twoPercents else curr - twoPercents
|
||||
|
|
Loading…
Reference in a new issue