mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-26 22:47:59 +01:00
do not show an error at exoplayer setup fail, just try reinitializing later
This commit is contained in:
parent
274a50013e
commit
5b040a699b
2 changed files with 3 additions and 9 deletions
|
@ -230,6 +230,7 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
}
|
||||
|
||||
refreshViewPager()
|
||||
view_pager.offscreenPageLimit = 2
|
||||
|
||||
if (config.blackBackground) {
|
||||
view_pager.background = ColorDrawable(Color.BLACK)
|
||||
|
@ -1104,10 +1105,6 @@ class ViewPagerActivity : SimpleActivity(), ViewPager.OnPageChangeListener, View
|
|||
override fun onPageScrolled(position: Int, positionOffset: Float, positionOffsetPixels: Int) {}
|
||||
|
||||
override fun onPageSelected(position: Int) {
|
||||
if (view_pager.offscreenPageLimit == 1) {
|
||||
view_pager.offscreenPageLimit = 2
|
||||
}
|
||||
|
||||
if (mPos != position) {
|
||||
mPos = position
|
||||
updateActionbarTitle()
|
||||
|
|
|
@ -122,7 +122,6 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
|||
|
||||
override fun onPlayerError(error: ExoPlaybackException?) {
|
||||
mIsExoPlayerInitialized = false
|
||||
activity?.showErrorToast(error.toString())
|
||||
}
|
||||
|
||||
override fun onLoadingChanged(isLoading: Boolean) {}
|
||||
|
@ -472,11 +471,9 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
|||
}.start()
|
||||
}
|
||||
|
||||
override fun onSurfaceTextureSizeChanged(surface: SurfaceTexture?, width: Int, height: Int) {
|
||||
}
|
||||
override fun onSurfaceTextureSizeChanged(surface: SurfaceTexture?, width: Int, height: Int) {}
|
||||
|
||||
override fun onSurfaceTextureUpdated(surface: SurfaceTexture?) {
|
||||
}
|
||||
override fun onSurfaceTextureUpdated(surface: SurfaceTexture?) {}
|
||||
|
||||
override fun onSurfaceTextureDestroyed(surface: SurfaceTexture?): Boolean {
|
||||
releaseExoPlayer()
|
||||
|
|
Loading…
Reference in a new issue