fix #1725, properly remember last video playback position, if paused
This commit is contained in:
parent
f4c02d1168
commit
3e7f99fc01
1 changed files with 6 additions and 2 deletions
|
@ -273,8 +273,12 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
|||
}
|
||||
|
||||
private fun saveVideoProgress() {
|
||||
if (!videoEnded() && mExoPlayer != null) {
|
||||
if (!videoEnded()) {
|
||||
if (mExoPlayer != null) {
|
||||
mConfig.saveLastVideoPosition(mMedium.path, mExoPlayer!!.currentPosition.toInt() / 1000)
|
||||
} else {
|
||||
mConfig.saveLastVideoPosition(mMedium.path, mPositionAtPause.toInt() / 1000)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue