html5视频自动播放功能在不静音的情况下无法正常工作 [英] html5 video autoplay feature not working without muted

查看:918
本文介绍了html5视频自动播放功能在不静音的情况下无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

到目前为止,html5视频控件中的autoplay参数一直运行良好,突然之间无法正常运行.我对显示视频控件的jsp页面进行了格式更改,但排除了这些问题.此处的另一篇文章提到了Chrome的更新,该更新仅允许使用静音参数自动播放.我试过了,哇,行得通.但这不是我们想要与播放器进行的用户交互.我该如何还原此视频,并且仍然允许在Chrome中自动播放?

The autoplay parameter in the html5 video control has been working great up till now and suddenly it does not. I made some formatting changes to my jsp page that displays the video control but ruled out these being the issue. Another post on here mentions an update to Chrome that only allows autoplay with muted parameter. I tried this and woh, it works. But this is not the user interaction we want for our player. How can I revert this and still allow autoplay in chrome?

<body id="body" language="javascript" onload="init()">

    <!-- Media Player -->

    <div>
            <div id="wrap_video">
            <video id="wrVideo" poster="data:image/gif,AAAA" controls width="100%" height="100%" controlsList="nodownload" preload="true" autoplay muted>
                <source src="" type="video/webm">
                <audio controls id="wrAudio" controls controlsList="nodownload" preload="auto" autoplay>
                    <source src="" type="audio/wav" >
                    Your browser does not support the audio element.
                </audio>
            </video>  
            </div>

    </div>

想法受到赞赏.

推荐答案

好吧,有一篇有趣的文章对您有帮助.顺便说一下,更新是在2018年4月完成的:)

Well, there is an interesing article that should help you. By the way, update was done at April 2018 :)

https://developers.google.com/web /updates/2017/09/autoplay-policy-changes

这篇关于html5视频自动播放功能在不静音的情况下无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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