I use the following HTML code which works fine auto-playing the mp4 in a modal window the first time in the session the button is clicked for the modal window.
<div id="modalwindowhelp" style="display:none;">
<center><img src="HELP WINDOW TEMP.jpg" height="400" width="1050">
<video controls autoplay>
<source src="whatever.mp4" type="video/mp4">
If you are reading this your browser does not support the video tag.
</div>
But if the user then leaves the modal window, then comes back to the modal window, the mp4 doesn't auto-play, it's necessary to click the "Play" button to start the mp4
How can I modify the HTML so that the mp4 auto-plays every time the modal window is opened?
Thanks!
Is the page closed or do they just open a new tab? If the page is closed it should play. Try using the loop attribute.
<video controls loop>
<source src="movie.mp4" type="video/mp4">
<source src="movie.ogg" type="video/ogg">
Your browser does not support the video tag.
</video>
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)