add an extra check at initializing video media player at menu visibility change
This commit is contained in:
parent
418c313d2d
commit
e87cc4a86d
|
@ -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 New Issue