1
votes

<!doctype html>
<html>
<head>
  <title>ING Summer Events</title>
  <meta http-equiv="content-type" content="text/html;charset=UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0"/>
  <meta name="apple-mobile-web-app-capable" content="yes">
  <meta name="apple-mobile-web-app-status-bar-style" content="black">


  <style type="text/css">
            .imagemap {position:relative;width:device-width;}
            img{display:block;}
    </style>
  <script> function callback () { document.querySelector('video').play(); } window.addEventListener("load", callback, false); </script>

</head>

  <body topmargin="0" leftmargin="0" bgcolor=black>

  <img src="./top.jpg" width=100% border="0" />
          <video width="100%" autoplay preload controls poster="./video.jpg">
              <source src="ingsummer.mp4" type="video/mp4">
              <source src="ingsummer.ogg" type="video/ogv">
          </video>
  <img src="./bottom.jpg" width=100% border="0" />



  </body>
</html>





This is it, on my Samsung Galaxynote2 it works perfectly...except on Chrome... What do I supposed to do? I cannot autoplay on Chromes

2
Please have a look at stackoverflow.com/questions/52995978/….Mahi

2 Answers

0
votes

I believe autoplay is currently disabled in Chrome for Android.

See: HTML 5 Autoplay Google Chrome Android Not Playing

0
votes

You need to add controls to video for mobile devices. They not support autoplay.