mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
adding some null checks at handling video end
This commit is contained in:
@@ -431,7 +431,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
|||||||
activity?.window?.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
activity?.window?.clearFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun videoEnded() = mExoPlayer!!.currentPosition >= mExoPlayer!!.duration
|
private fun videoEnded() = mExoPlayer?.currentPosition ?: 0 >= mExoPlayer?.duration ?: 0
|
||||||
|
|
||||||
private fun setProgress(seconds: Int) {
|
private fun setProgress(seconds: Int) {
|
||||||
mExoPlayer!!.seekTo(seconds * 1000L)
|
mExoPlayer!!.seekTo(seconds * 1000L)
|
||||||
|
Reference in New Issue
Block a user