mirror of
https://github.com/FossifyOrg/Gallery.git
synced 2024-11-27 06:57:59 +01:00
add a mediaplayer nullcheck
This commit is contained in:
parent
33af23878a
commit
0011f41cdb
1 changed files with 3 additions and 0 deletions
|
@ -289,6 +289,9 @@ class VideoFragment : ViewPagerFragment(), View.OnClickListener, SurfaceHolder.C
|
||||||
if (activity == null)
|
if (activity == null)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
if (mMediaPlayer == null)
|
||||||
|
initMediaPlayer()
|
||||||
|
|
||||||
val videoProportion = mMediaPlayer!!.videoWidth.toFloat() / mMediaPlayer!!.videoHeight.toFloat()
|
val videoProportion = mMediaPlayer!!.videoWidth.toFloat() / mMediaPlayer!!.videoHeight.toFloat()
|
||||||
val display = activity.windowManager.defaultDisplay
|
val display = activity.windowManager.defaultDisplay
|
||||||
val screenWidth: Int
|
val screenWidth: Int
|
||||||
|
|
Loading…
Reference in a new issue