当我从其他页面(单独)再次访问主页时,如何自动静音视差网站主页视频声音?
当我点击进入按钮并转到“我们的dna”页面并从该页面点击菜单上的事件链接。现在,您将出现在“我们的活动”中,此时视频将开始播放,用户可以听到视频的声音。用户此时不应听到声音。我们必须将视频声音静音。
答案 0 :(得分:0)
制作鼠标悬停事件。
if you are over the video then
document._video.muted=false
else
document._video.muted=true
或:
$("#video").hover(function() {
$(this).pause();
}, function() {
$(this).play();
});