use a background thread for setting video surface
This commit is contained in:
parent
be743c1d7f
commit
7b2a181942
|
@ -506,7 +506,9 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
|||
}
|
||||
|
||||
override fun onSurfaceTextureAvailable(surface: SurfaceTexture?, width: Int, height: Int) {
|
||||
mExoPlayer?.setVideoSurface(Surface(mTextureView!!.surfaceTexture))
|
||||
Thread {
|
||||
mExoPlayer?.setVideoSurface(Surface(mTextureView!!.surfaceTexture))
|
||||
}.start()
|
||||
}
|
||||
|
||||
@TargetApi(Build.VERSION_CODES.JELLY_BEAN_MR1)
|
||||
|
|
Loading…
Reference in New Issue