use a background thread for releasing exoplayer
This commit is contained in:
parent
c0e9e931c1
commit
393420ab2d
1 changed files with 4 additions and 2 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue