ramiwahdan Posted July 1, 2020 Share Posted July 1, 2020 Hi, I have a video to play at the load of the page but I have a problem. autoplay is set and i don't want to start muted as i need the sound to be heard. The weird part is, if the page is loaded it won't start but if i moved to different page then go back to the main page, it will start the video with sound! Quote <div align="center"> <video width="100%" height="25%" controls poster="img\thumb\overview.jpg" autoplay> <source src="vids\cs-cdi\overview.mp4"> </video> <br> <b>Featured Video from student to classmates - G12A1 - CDI</b> </div> Please help. Quote Link to comment Share on other sites More sharing options...
NotSunfighter Posted July 1, 2020 Share Posted July 1, 2020 (edited) You really don't need to use a DIV in the HTML code. Your video is at 100% and centering is unresponsive. To center the <B> text use: style="text-align:center;display:block;margin: 0 auto;" to the tag I found a hack for you to try. Add an ID to the video (ID="myvideo"). Then use JAVASCRIPT: <script> document.getElementById('myvideo').play(); </script> See if that works. Edited July 1, 2020 by NotSunfighter Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.