do not continue at setting up the video if theres an error
This commit is contained in:
parent
e3f0d7ea56
commit
18b714f9c3
|
@ -306,8 +306,10 @@ class VideoFragment : ViewPagerFragment(), SurfaceHolder.Callback, SeekBar.OnSee
|
|||
return
|
||||
|
||||
initMediaPlayer()
|
||||
if (mMediaPlayer == null)
|
||||
if (mMediaPlayer == null) {
|
||||
activity.toast(R.string.unknown_error_occurred)
|
||||
return
|
||||
}
|
||||
|
||||
val videoProportion = mMediaPlayer!!.videoWidth.toFloat() / mMediaPlayer!!.videoHeight.toFloat()
|
||||
val display = activity.windowManager.defaultDisplay
|
||||
|
|
Loading…
Reference in New Issue