【发布时间】:2021-05-02 10:55:51
【问题描述】:
我添加了一个视频作为背景(您可以找到许多技巧),该视频可以在 chrome 移动设备、桌面设备上自动播放,但不能在 Firefox 移动设备和 Firefox Focus 上自动播放。它是 Mozilla 特有的吗?这是移动视频的规则吗?
video#bgvid {
position: fixed;
right: 0; bottom: 0;
min-width: 100%; min-height: 100%;
width: auto; height: auto; z-index: -10;
background-size: cover;
}
<script>
window.onload = function(){
document.getElementById('bgvid').play();
}
</script>
<video id="bgvid" playsinline src="bg3.mp4" autoplay="autoplay" loop autoplay muted>
</video>
【问题讨论】:
标签: android html firefox video autoplay