videojs 遇到的坑彙總

videojs 和 mui.js 衝突的解決方案javascript

//視頻播放  
videojs("#hk-video",{},function(){  
    //阻止相關控制元素上的相關事件冒泡,不然當引入了mui.js之後就會2333,目前只發現touchstart事件有影響  
    mui("#hk-video").on("touchstart",".vjs-control",function(){  
        return false;  
    });  
});

參考:https://ask.dcloud.net.cn/question/30088html

手機端用 touchstart,PC端用 clickjava

捕獲雙擊事件ios


videojs('#id', {
    userActions: {
        doubleClick: myDoubleClickHandler
    }
}, function() {})

iOS 自動播放web

document.addEventListener('WeixinJSBridgeReady',function(){
    $('#shakeVideo').play();
},false);

參考:https://blog.csdn.net/tangxiujiang/article/details/78146871ide

其餘參考:https://webkit.org/blog/6784/new-video-policies-for-ios/ui

 

 

videojs options:  https://docs.videojs.com/tutorial-options.htmlurl

videojs components: https://docs.videojs.com/tutorial-components.html.net

videojs methods/events: https://docs.videojs.com/playercode

相關文章
相關標籤/搜索