title: jquery trigger a click event for video
body: <p>I am using a jquery code to automatically run the video on desktops, with all versions of safari on mac it works except the the latest one which is high sierra, i am trying every possible combination to run it, no matter how apple sees it, </p>
  
  <p>I had the code which mostly works </p>
  
  <pre><code>function startVideoIfNotStarted () {
       window.setTimeout(function(){
          var play = document.getElementById("player");
          play.addEventListener("load",function(){
              player.play();
          })
       }, 800);
  
      }
    startVideoIfNotStarted();
  </code></pre>
  
  <p>Now i am trying to use the click event to trigger itself but i am little bit confused on the code how should i do </p>
  
  <pre><code>setTimeout(function() {
              var play = document.getElementById("player");
              play.addEventListener("click",function(){
                  player.play();
              })
           }, 1000);
  </code></pre>