The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> mp4 Video Only Auto-Starts First Time in Session, Modify HTML To Always Auto-Start
beau
post May 5 2016, 05:07 PM
Post #1





Group: Members
Posts: 2
Joined: 22-October 14
Member No.: 21,709



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
IPB Image

How can I modify the HTML so that the mp4 auto-plays every time the modal window is opened?

Thanks!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
lisas
post Feb 27 2017, 12:06 PM
Post #2





Group: Members
Posts: 6
Joined: 27-February 17
Member No.: 26,328



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>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 18th March 2024 - 09:00 PM