首页 文章

Chrome自动播放视频无效

提问于
浏览
-3

我们网站https://webdesign-weinstrasse.de上的自动播放背景视频无效 . 我知道新政策,但视频有 no audio-track .

有没有人有想法或答案?

谢谢Udo

1 回答

  • 1

    测试了WP RevSlider中的视频源 . 即使您的视频没有音轨 . 但它仍然需要在视频标签中使用自动播放和静音标签 . 通过这种方式,它将自动播放镀铬的静音 . 有关详细信息,请查看以下

    enter image description here

    enter image description here

    您可以使用当前使用的RevSlider设置添加额外参数 . 检查以下内容参考 . https://help.vimeo.com/hc/en-us/articles/360001494447-Using-Player-Parameters
    enter image description here

    OR TRY FOLLOWING 我使用jquery添加了静音标签 . 您可以将其用于revslider视频 .

    $( document ).ready(function() {
         console.log( "ready!" );
    	  $("video").prop("autoplay",true);
    	  $("video").prop("muted",true);
    });
    
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    
    <video loop width="1920" height="1080" id="mejs_0720491071360283_html5" preload="auto" src="https://webdesign-weinstrasse.de/wp-content/uploads/2018/02/weinberg.mp4" style="margin: 0px; width: 1616px; height: 909px;">
      <source type="video/mp4" src="https://webdesign-weinstrasse.de/wp-content/uploads/2018/02/weinberg.mp4" />
      <source type="video/webm" src="https://webdesign-weinstrasse.de/wp-content/uploads/2017/02/On-the-vine.webm" />
    </video>
    

相关问题