use a background thread for releasing exoplayer

This commit is contained in:
tibbi 2018-07-06 11:52:00 +02:00
parent c0e9e931c1
commit 393420ab2d

View file

@ -456,8 +456,10 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
private fun releaseExoPlayer() {
mExoPlayer?.stop()
Thread {
mExoPlayer?.release()
mExoPlayer = null
}.start()
}
override fun onSurfaceTextureSizeChanged(surface: SurfaceTexture?, width: Int, height: Int) {