do not show an error at exoplayer setup fail, just try reinitializing later

This commit is contained in:
tibbi 2018-07-15 11:17:21 +02:00
parent 274a50013e
commit 5b040a699b
2 changed files with 3 additions and 9 deletions

View file

@ -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()

View file

@ -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()