How can I autoplay media in Safari on an iPhone?
<p>I'm trying to get an video file to autoplay in Safari on an iPhone.
But this javascript not working on  Safari on an iPhone, but on Android it's fine.</p>

<pre><code>                         window.onload = function () {
                              var pElement = document.getElementById("myVideo");

                              setTimeout(function () {
                                  pElement.load();

                                  setTimeout(function () {
                                      pElement.play();
                                  }, 500);
                              }, 500);
                          };
</code></pre>
