视频播放禁止拖动和双击重新开始
This commit is contained in:
@@ -29,6 +29,18 @@ class SimpleVideoPlayer : StandardGSYVideoPlayer {
|
||||
private lateinit var start: ImageView
|
||||
private var updateTimer = 0L
|
||||
|
||||
/**
|
||||
* true 开着双击重新播放
|
||||
* false 关闭双击播放
|
||||
*/
|
||||
var enableDoubleClick = true
|
||||
|
||||
/**
|
||||
* true 显示拖动线上进度弹框
|
||||
* false 重写拖动进度弹框
|
||||
*/
|
||||
var enableshowProgressDialog = true
|
||||
|
||||
interface PlayListener {
|
||||
fun onPlayEvent(event: Int)
|
||||
}
|
||||
@@ -195,4 +207,24 @@ class SimpleVideoPlayer : StandardGSYVideoPlayer {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun touchDoubleUp() {
|
||||
if(enableDoubleClick) {
|
||||
super.touchDoubleUp()
|
||||
}
|
||||
}
|
||||
|
||||
override fun showProgressDialog(deltaX: Float, seekTime: String?, seekTimePosition: Int, totalTime: String?, totalTimeDuration: Int) {
|
||||
if(enableshowProgressDialog) {
|
||||
super.showProgressDialog(deltaX, seekTime, seekTimePosition, totalTime, totalTimeDuration)
|
||||
}
|
||||
}
|
||||
|
||||
override fun dismissProgressDialog() {
|
||||
if(enableshowProgressDialog) {
|
||||
super.dismissProgressDialog()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user