make sure mSurfaceView isnt null when initing media player
This commit is contained in:
parent
98b426d21e
commit
034f3b5c56
1 changed files with 3 additions and 1 deletions
|
@ -95,7 +95,9 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
||||||
super.setMenuVisibility(menuVisible)
|
super.setMenuVisibility(menuVisible)
|
||||||
mIsFragmentVisible = menuVisible
|
mIsFragmentVisible = menuVisible
|
||||||
if (menuVisible) {
|
if (menuVisible) {
|
||||||
|
if (mSurfaceView != null)
|
||||||
initMediaPlayer()
|
initMediaPlayer()
|
||||||
|
|
||||||
if (context?.config?.autoplayVideos == true) {
|
if (context?.config?.autoplayVideos == true) {
|
||||||
playVideo()
|
playVideo()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue