loop the video if set so

This commit is contained in:
tibbi 2016-12-28 20:37:10 +01:00
parent 1bbca50bac
commit 085c62b10b

View file

@ -276,9 +276,13 @@ class VideoFragment : ViewPagerFragment(), View.OnClickListener, SurfaceHolder.C
}
override fun onCompletion(mp: MediaPlayer) {
mSeekBar!!.progress = mSeekBar!!.max
mCurrTimeView!!.text = getTimeString(mDuration)
pauseVideo()
if (Config.newInstance(context).loopVideos) {
playVideo()
} else {
mSeekBar!!.progress = mSeekBar!!.max
mCurrTimeView!!.text = getTimeString(mDuration)
pauseVideo()
}
}
override fun onVideoSizeChanged(mp: MediaPlayer, width: Int, height: Int) {