html视频播放禁止拖动进度条禁止快进的方法
html视频播放禁止拖动进度条禁止快进的方法
使用场景
本功能观看视频后根据视频内容提交问卷,所以需要保证必须先观看完整视频才可以访问问卷。
代码示例
<video id="myVideo" autoplay src="{dr_get_file($video)}" width="640" height="360" class="note-video-clip"></video><div style="width:100px; margin:0 auto"> <button class="btn green btn-sm" id="startPlay"> <i class="bi bi-play-circle-fill"></i>播放</button> <button class="btn yellow btn-sm" id="stopPlay"> <i class="bi bi-skip-start-circle-fill"></i>暂停</button> </div>
window.onload=function(){ var video=document.getElementById("myVideo"); var startPlay=document.getElementById('startPlay'); var stopPlay=document.getElementById('stopPlay'); startPlay.addEventListener('click',function() { video.play(); }); stopPlay.addEventListener('click',function() { video.pause(); }); }
本文属原创,转载请注明原文:http://www.zhimatong.com/jiaocheng/923.html
为保证教程的实用性及扩大知识面覆盖,如果您有相似问题而未解决,可联系在线客服免费技术支持。
点赞 1
热门主题
相关阅读
- 苹果手机iOS设备,浏览器在 textarea 或 input 中输入文字时页面放大的解决办法
- select选择后直接跳转到其他网站的三种方式
- 详解CSS居中对齐的3种方式15个样例
- Echarts图表基本参数设置说明
- jQuery报错$(this).attr(‘checked‘)undefined/checkbox无法改变其状态的解决方法
- jq .html() 特效无效的解决办法
- 如何将iconfont中的字体图标全部展示在页面中
- HTML特殊字符符号大全
- jQuery清空input的值,清除标签内容的方法
- jQuery 获取相同 class元素的最后一个元素或id
- ajax传递data的三种传递方式
- jQuery跳转页面的3种代码示例