make sure mSurfaceView isnt null when initing media player

This commit is contained in:
tibbi 2017-06-19 07:44:10 +02:00
parent 98b426d21e
commit 034f3b5c56

View file

@ -95,7 +95,9 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
super.setMenuVisibility(menuVisible)
mIsFragmentVisible = menuVisible
if (menuVisible) {
initMediaPlayer()
if (mSurfaceView != null)
initMediaPlayer()
if (context?.config?.autoplayVideos == true) {
playVideo()
}