do not refresh media at playing fullscreen videos, should fix some reseting

This commit is contained in:
tibbi 2020-03-01 23:05:04 +01:00
parent 9c31b8d01e
commit 387eccbadd
2 changed files with 2 additions and 2 deletions

View file

@ -1104,7 +1104,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
private fun gotMedia(thumbnailItems: ArrayList<ThumbnailItem>) { private fun gotMedia(thumbnailItems: ArrayList<ThumbnailItem>) {
val media = thumbnailItems.asSequence().filter { it is Medium && !mIgnoredPaths.contains(it.path) }.map { it as Medium }.toMutableList() as ArrayList<Medium> val media = thumbnailItems.asSequence().filter { it is Medium && !mIgnoredPaths.contains(it.path) }.map { it as Medium }.toMutableList() as ArrayList<Medium>
if (isDirEmpty(media) || media.hashCode() == mPrevHashcode) { if (isDirEmpty(media) || media.hashCode() == mPrevHashcode || (getCurrentFragment() as? VideoFragment)?.mIsPlaying == true) {
return return
} }

View file

@ -44,7 +44,6 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
private var mWasFragmentInit = false private var mWasFragmentInit = false
private var mIsPanorama = false private var mIsPanorama = false
private var mIsFragmentVisible = false private var mIsFragmentVisible = false
private var mIsPlaying = false
private var mIsDragged = false private var mIsDragged = false
private var mWasVideoStarted = false private var mWasVideoStarted = false
private var mWasPlayerInited = false private var mWasPlayerInited = false
@ -55,6 +54,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
private var mDuration = 0 private var mDuration = 0
private var mPositionWhenInit = 0 private var mPositionWhenInit = 0
private var mPositionAtPause = 0L private var mPositionAtPause = 0L
var mIsPlaying = false
private var mExoPlayer: SimpleExoPlayer? = null private var mExoPlayer: SimpleExoPlayer? = null
private var mVideoSize = Point(1, 1) private var mVideoSize = Point(1, 1)