相信很多Web前端开发小伙伴因为工作的需求,在研究怎么通过HTML5实现视频在手机浏览器的自动播放(主流浏览器)。在这里,我要告诉大家:
- Chrome for Android 从版本54开始支持静音视频自动播放
- Safari for iOS 10 从版本602开始支持静音视频自动播放
- Autoplay, whether muted or not, is already supported on Android by Firefox and UC Browser: they do not block any kind of autoplay
据说是为了通过视频解决大体积的GIF动画问题
系统/浏览器 | 是否支持自动播放 |
---|---|
iOS 9 Safari 601 | no |
iOS 10 Safari 602 | yes (with muted + playsinline attributes) |
iOS 9 Chrome 54 | no |
iOS 10 Chrome 54 | yes (with muted + playsinline attributes) |
iOS 9 Opera Mini 14 | no |
iOS 10 Opera Mini 14 | yes (plays fullscreen) |
iOS 9 Firefox 5.3 | no |
iOS 10 Firefox 5.3 | no |
Android Chrome 43 | no |
Android Chrome 54 | yes (with muted attribute) |
Android Opera Mini 20 | no |
Android Firefox 49 | yes |
Android Samsung Internet 4.0 | no |
Windows Phone 8 IEMobile 10 | no |
Windows Phone 8.1 IEMobile 11 | yes |
Windows 10 Mobile Edge 14.1 | no |
Windows 10 Mobile Opera Mini 9.1 | no |