shortening some code
This commit is contained in:
parent
b2da6f5080
commit
f187a36ebb
2 changed files with 6 additions and 8 deletions
|
@ -194,13 +194,13 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen
|
||||||
if (config.allowVideoGestures) {
|
if (config.allowVideoGestures) {
|
||||||
video_brightness_controller.initialize(this, slide_info, true, video_player_holder, singleTap = { x, y ->
|
video_brightness_controller.initialize(this, slide_info, true, video_player_holder, singleTap = { x, y ->
|
||||||
toggleFullscreen()
|
toggleFullscreen()
|
||||||
}, doubleTap = {x, y ->
|
}, doubleTap = { x, y ->
|
||||||
doSkip(false)
|
doSkip(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
video_volume_controller.initialize(this, slide_info, false, video_player_holder, singleTap = { x, y ->
|
video_volume_controller.initialize(this, slide_info, false, video_player_holder, singleTap = { x, y ->
|
||||||
toggleFullscreen()
|
toggleFullscreen()
|
||||||
}, doubleTap = {x, y ->
|
}, doubleTap = { x, y ->
|
||||||
doSkip(true)
|
doSkip(true)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
@ -497,11 +497,9 @@ open class VideoPlayerActivity : SimpleActivity(), SeekBar.OnSeekBarChangeListen
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun skip(forward: Boolean) {
|
private fun skip(forward: Boolean) {
|
||||||
if (mExoPlayer == null) {
|
if (mExoPlayer != null) {
|
||||||
return
|
doSkip(forward)
|
||||||
}
|
}
|
||||||
|
|
||||||
doSkip(forward)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun doSkip(forward: Boolean) {
|
private fun doSkip(forward: Boolean) {
|
||||||
|
|
|
@ -206,7 +206,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
||||||
} else {
|
} else {
|
||||||
toggleFullscreen()
|
toggleFullscreen()
|
||||||
}
|
}
|
||||||
}, doubleTap = {x, y ->
|
}, doubleTap = { x, y ->
|
||||||
doSkip(false)
|
doSkip(false)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -216,7 +216,7 @@ class VideoFragment : ViewPagerFragment(), TextureView.SurfaceTextureListener, S
|
||||||
} else {
|
} else {
|
||||||
toggleFullscreen()
|
toggleFullscreen()
|
||||||
}
|
}
|
||||||
}, doubleTap = {x, y ->
|
}, doubleTap = { x, y ->
|
||||||
doSkip(true)
|
doSkip(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue