release video mediaplayer on a background thread
This commit is contained in:
parent
46a143e4ac
commit
f63a8eebac
1 changed files with 5 additions and 3 deletions
|
@ -467,9 +467,11 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
}
|
||||
|
||||
private fun releaseMediaPlayer() {
|
||||
mMediaPlayer?.setSurface(null)
|
||||
mMediaPlayer?.release()
|
||||
mMediaPlayer = null
|
||||
Thread {
|
||||
mMediaPlayer?.setSurface(null)
|
||||
mMediaPlayer?.release()
|
||||
mMediaPlayer = null
|
||||
}.start()
|
||||
}
|
||||
|
||||
private fun videoPrepared(mediaPlayer: MediaPlayer) {
|
||||
|
|
Loading…
Reference in a new issue