1
我有一個應用程序,可以讓您左右滑動以查看不同的屏幕,或者單擊Next和Previous按鈕進行導航。觸摸事件在視頻標記後停止在iPad上工作
if(isMobile){
detectSwipe = true;
document.addEventListener('touchstart',TouchStart,false);
document.addEventListener('touchmove',TouchMove,false);
document.addEventListener('touchend',TouchEnd,false);
document.addEventListener('touchend',TouchCancel,false);
}
$("#prevBtn").on('touchstart click', function() {
...
}
的問題是由於一些未知的原因,當它到達的畫面與視頻標籤的所有按鈕變爲不可點擊,只有刷卡事件仍然有效。這隻發生在iPad上,但在桌面上它工作正常。
<video width="960" height="560">
<source src="video.mp4" type="video/mp4"/>
<source src="video.ogg" type="video/ogg"/>
<source src="video.webm" type="video/webm"/>
Your browser does not support the video tag.
</video>
我也試過使用嵌入式的youtube視頻而不是視頻標籤,但問題仍然存在。
如果可能的話,你可以發一個小提琴嗎? – codebreaker
不幸的是,完整的東西超過14000行代碼 – Catpixels