HTML5视频:如何在Android版Chrome中启用*非静音*自动播放 [英] HTML5 Video: How to enable *non-muted* autoplay in Chrome for Android

查看:480
本文介绍了HTML5视频:如何在Android版Chrome中启用*非静音*自动播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为当地博物馆设计一个简单的解决方案,希望访问者能够与安装在平板电脑上的内容丰富的视频进行互动。这些视频只是简单的嵌入到简单的HTML5页面,并应该在页面加载时自动播放。然而,谷歌显然已经决定 在Android版Chrome上启用自动播放功能,只要视频是 未静音 。他们的推理显然是资源/带宽成本高昂,用户(谁?)不喜欢它。换句话说:它将在Chrome桌面版本等等,但是当你没有添加关键字静音的标签,它不会自动播放Android设备上。



所以这个工作:

 < video id =playerclass =player控制自动播放静音> 

但不是这样:

 < video id =playerclass =playercontrols autoplay> 

我之所以坚持使用Chrome,是因为我想将网页作为应用/快捷方式运行在主屏幕上,以摆脱所有标签和东西的Chrome界面栏。所以问题是平板电脑上是否有设置或其他技巧来启用非静音自动播放,所以我可以得到这个工作。或者是否可以让Firefox用于放置在主屏幕上的网址(或其他方式来摆脱顶部的界面栏)。如果你想做一个你控制的设备,那么你可以(虽然显然这不是你可以很容易地获得用户的东西浏览器广泛,而不是特定的网站)。



导航到 chrome:// flags 并将媒体播放的手势要求设置为禁用
(大约三或四页)

I am working on a simple solution for a local museum that wants visitors to interact with informative videos installed on tablets. The videos are simply embedded on simple HTML5 pages and are supposed to autoplay upon page load.

However, in their infinite wisdom, Google has apparently decided not to enable autoplay on Chrome for Android if the video is not muted. Their reasoning is apparently that it is resource/bandwith costly and "users" (who?) did not like it.

In other words: It will work on Chrome desktop versions and such, but when you have not added the keyword "muted" to the tag, it will not autoplay on an Android device.

So this works:

 <video id="player" class="player" controls autoplay muted>

But not this:

 <video id="player" class="player" controls autoplay>

The reason I am stuck with Chrome, is because I want to run the webpages as an app/shortcut on the homescreen, so as to get rid of the Chrome interface bar with all the tabs and stuff.

So the question is whether there is a setting on the tablet or some other trick to enable non-muted autoplay, so I can get this to work. Or is it possible to let Firefox be used for urls placed on the homescreen (or some other way to get rid of the top interface bar).

解决方案

If you want to do it for a device you control then you can (though obviously it's not something you can easily get users to do for their devices as it applies browser wide, not site specific).

Navigate to chrome://flags and set gesture requirement for media playback (about three or four pages down the list) to disabled

这篇关于HTML5视频:如何在Android版Chrome中启用*非静音*自动播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆