Skip to content
标签
欢迎扫码关注公众号

Chrome 浏览器下的 Video 标签自动播放

添加 muted (静音)属性后,Chrome 下才能实现自动播放。手机浏览器只测试了 Safari,即使加了 muted 属性也是不会自动播放的。

html
<video muted autoplay controls loop src="filename.mp4">
</video>

不带 controls 属性的效果(因为隐藏了控制器,所以 Safari 上无法播放):

html
<video muted autoplay loop src="/files/2018/06/18/6adc108fly1fsf77shl6dg20a00ci1l6.mp4">
</video>

controls 属性的效果:

html
<video muted autoplay controls loop src="/files/2018/06/18/6adc108fly1fsf77shl6dg20a00ci1l6.mp4">
</video>

Page Layout Max Width

Adjust the exact value of the page width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the page layout
A ranged slider for user to choose and customize their desired width of the maximum width of the page layout can go.

Content Layout Max Width

Adjust the exact value of the document content width of VitePress layout to adapt to different reading needs and screens.

Adjust the maximum width of the content layout
A ranged slider for user to choose and customize their desired width of the maximum width of the content layout can go.