move mediaplayer releasing back on main thread

This commit is contained in:
tibbi 2017-12-30 09:00:36 +01:00
parent d4d06cf2a7
commit 1b496b5632

View file

@ -467,11 +467,9 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
}
private fun releaseMediaPlayer() {
Thread {
mMediaPlayer?.setSurface(null)
mMediaPlayer?.release()
mMediaPlayer = null
}.start()
mMediaPlayer?.setSurface(null)
mMediaPlayer?.release()
mMediaPlayer = null
}
private fun videoPrepared(mediaPlayer: MediaPlayer) {