New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
进度条禁用失效 #1401
Comments
直接 后拖 禁止拖动成功 |
基于官方示例添加一个 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
您使用的西瓜播放器版本是多少? What version of xgplayer are you using?
"xgplayer": "^3.0.10",
"xgplayer-mp4": "3.0.10"
您使用的操作系统和浏览器分别是? What OS and browser are you using?
win11 chrome
如何复现问题? How to reproduce the problem?
player.value.usePluginHooks('progress', 'dragstart', (_plugin: any, _event: any, data: any) => {
// 当点击开始的位置计算出来的时间data.currentTime大于当前播放过的时间,则阻止默认行为
if (data.currentTime > player.value.currentTime && data.currentTime > time) {
return false
}
return true
})
player.value.usePluginHooks('progress', 'drag', (_plugin: any, _event: any, data: any) => {
// return false
// 当拖拽的位置计算出来的时间data.currentTime大于当前播放过的时间,则阻止默认行为
if (data.currentTime > player.value.currentTime && data.currentTime > time) {
return false
}
return true
})
需求:学习视频,不可前拖进度条 ,可以回拖进度条
问题: 若直接前托到达指定范围可以禁止拖动 是ok的
若先后拖在前拖 , 进度条样式是禁止状态, 松手后禁止状态失效 ,依然可以拖动到指定位置
您期望的播放器正常行为是? What did you expect to happen?
禁止后拖进度条
实际播放器的表现是? What actually happened?
先后拖 在前拖 禁用效果失效
可填写您所在的公司和相关产品业务,方便我们提供更好的技术支持 You can write your company and product which uses xgplayer, for helping us provide better technical support.
The text was updated successfully, but these errors were encountered: