如何在版本66或更高版本的Google Chrome亭应用中允许视频自动播放 [英] How to allow video autoplay in a Google Chrome kiosk app in version 66 or later

查看:1899
本文介绍了如何在版本66或更高版本的Google Chrome亭应用中允许视频自动播放的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



这个改变是在Google Chrome版本66开始的时候,不再自动开始播放音频和视频文件。阻止对广告视频和其他烦人的网页元素进行自动播放。然而,这对于一些完全有效的自动播放功能的应用程序(例如在标牌应用程序中)具有负面影响。



不自动播放视频的新默认行为声音可以在Google Chrome浏览器启动时通过命令行选项覆盖

- autoplay-policy = no-user-gesture-要求





- -no-user-gesture-required



新的默认自动播放行为也出现在Chrome浏览器的Chrome浏览器中在测试版频道中)。对于在ChromeOS上运行的自助服务终端应用程序,不存在命令行选项,仅使用Manifest.json文件进行配置。



目前Manifest的文档中没有选项。 json格式,允许更改自动播放策略。



有什么方法可以更改Kiosk应用中的Chrome默认自动播放政策,以允许在ChromeOS上自动播放应用中的视频?


<最终用户将不得不手动启用自动视频播放功能,方法如下:


  1. 启动后按下Ctrl + Alt + S

  2. 登录 打开Chrome浏览器并键入: chrome:// flags /#autoplay-policy

  3. 将自动播放策略从默认更改为无需用户手势 >
  4. 按重新启动

  5. 重新启动设备 现在在自动播放中可以在您的应用中使用的webview组件中再次使用。



    请参阅此评论主题关于这个话题由谷歌。


    As of version 66 of Google Chrome onwards it will no longer automatically start playback of audio and video files when the playback volume is not muted.

    This change was made to prevent autoplay on ad videos and other annoying web page elements. However, this has negative consequences for a number of perfectly valid applications of the autoplay feature, for instance in signage applications.

    The new default behaviour of not auto playing a video with sound can be overridden at the startup of the Google Chrome browser with the command line options

    --autoplay-policy=no-user-gesture-required

    or

    --no-user-gesture-required

    The new default autoplay behaviour is also present in the Chrome browser on ChromeOS (currently in the beta channel). For Kiosk-apps running on ChromeOS there are no command line options, only configuration using the Manifest.json file.

    Currently there is no option in the documentation of the Manifest.json format that allows changing the autoplay policy.

    Is there any way to change the new Chrome default autoplay policy in Kiosk apps to allow autoplay of videos in an app on ChromeOS?

    解决方案

    It turns out that the end user will have to enable automatic video playback manually, by:

    1. upon startup pressing Ctrl+Alt+S
    2. logging in
    3. opening a Chrome browser and typing: chrome://flags/#autoplay-policy
    4. changing the "Autoplay policy" from "Default" to "No user gesture is required"
    5. pressing "relaunch"
    6. rebooting the device

    From now on autoplay works again in webview components used in your app.

    See this comment thread about this topic by Google.

    这篇关于如何在版本66或更高版本的Google Chrome亭应用中允许视频自动播放的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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