add an extra check at initializing video media player at menu visibility change
This commit is contained in:
parent
418c313d2d
commit
e87cc4a86d
1 changed files with 2 additions and 1 deletions
|
@ -95,8 +95,9 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
super.setMenuVisibility(menuVisible)
|
||||
mIsFragmentVisible = menuVisible
|
||||
if (menuVisible) {
|
||||
if (mSurfaceView != null)
|
||||
if (mSurfaceView != null && mSurfaceHolder!!.surface.isValid) {
|
||||
initMediaPlayer()
|
||||
}
|
||||
|
||||
if (context?.config?.autoplayVideos == true) {
|
||||
playVideo()
|
||||
|
|
Loading…
Reference in a new issue