rely on the null check inside initMediaPlayer()
This commit is contained in:
parent
0011f41cdb
commit
fe61fdd66a
1 changed files with 2 additions and 6 deletions
|
@ -289,9 +289,7 @@ class VideoFragment : ViewPagerFragment(), View.OnClickListener, SurfaceHolder.C
|
|||
if (activity == null)
|
||||
return
|
||||
|
||||
if (mMediaPlayer == null)
|
||||
initMediaPlayer()
|
||||
|
||||
initMediaPlayer()
|
||||
val videoProportion = mMediaPlayer!!.videoWidth.toFloat() / mMediaPlayer!!.videoHeight.toFloat()
|
||||
val display = activity.windowManager.defaultDisplay
|
||||
val screenWidth: Int
|
||||
|
@ -344,9 +342,7 @@ class VideoFragment : ViewPagerFragment(), View.OnClickListener, SurfaceHolder.C
|
|||
}
|
||||
|
||||
override fun onStartTrackingTouch(seekBar: SeekBar) {
|
||||
if (mMediaPlayer == null)
|
||||
initMediaPlayer()
|
||||
|
||||
initMediaPlayer()
|
||||
mMediaPlayer!!.pause()
|
||||
mIsDragged = true
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue