mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
fix #1725, properly remember last video playback position, if paused
This commit is contained in:
@ -273,8 +273,12 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun saveVideoProgress() {
|
private fun saveVideoProgress() {
|
||||||
if (!videoEnded() && mExoPlayer != null) {
|
if (!videoEnded()) {
|
||||||
mConfig.saveLastVideoPosition(mMedium.path, mExoPlayer!!.currentPosition.toInt() / 1000)
|
if (mExoPlayer != null) {
|
||||||
|
mConfig.saveLastVideoPosition(mMedium.path, mExoPlayer!!.currentPosition.toInt() / 1000)
|
||||||
|
} else {
|
||||||
|
mConfig.saveLastVideoPosition(mMedium.path, mPositionAtPause.toInt() / 1000)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user