我们知道在移动设备中自动播放视频是一项艰巨的任务,因为已从Android和ios设备中删除视频自动播放,以最大限度地减少在负载中支付移动互联网费用的用户的数据使用情况 . 因此,我使用jquery来触发自动播放视频,并且还在视频标签中包含了autoplay关键字,但无论如何它在Windows Safari中都不起作用 . 这是jquery

$(document).ready(function(){

 $('#play').trigger('click');  

 });

function vidplay() {
   var video = document.getElementById("Video1");
   var button = document.getElementById("play");
   if (video.paused) {
      video.play();
      button.textContent = "||";
   } else {
      video.pause();
      button.textContent = ">";
   }
}

function restart() {
    var video = document.getElementById("Video1");
    video.currentTime = 0;
}

function skip(value) {
    var video = document.getElementById("Video1");
    video.currentTime += value;
}

我已经使用了视频标签和自动播放,它在Windows Chrome中运行良好,但在Windows Safari中不起作用 . 这是html部分

<body>        

<video id="Video1" autoplay loop muted playsinline controls>

    <source src="http://sandbox399.mybigcommerce.com/content/Video/Violet_vapor_intro_3D_v2.mp4" type="video/mp4">
<source src="http://sandbox399.mybigcommerce.com/content/Video/Violet_vapor_intro_3D_v2.ogg" type="video/ogg"> 



</video>

<div id="buttonbar">
<button id="restart" onclick="restart();">[]</button> 
<button id="rew" onclick="skip(-10)">&lt;&lt;</button>
<button id="play" onclick="vidplay()">&gt;</button>
<button id="fastFwd" onclick="skip(10)">&gt;&gt;</button>

</div>         
</body>

我只是想在Windows Safari中播放这个视频自动播放 . 任何形式的帮助将不胜感激 . 我尝试使用videojs,但我不太了解它,所以就在这里发布了 .