Jump to content


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.

Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.


Stop Auto Play of mp4 & Allow Auto Play in Modal Window

  • Please log in to reply
No replies to this topic

#1 beaujay


  • Members
  • 9 posts
  • Local time:02:23 AM

Posted 20 February 2017 - 04:36 PM

I have a modal window which contains an .mp4 which auto-plays when the window is opened.
But the .mp4 also automatically plays whenever the web page is opened.
What change(s) must I make to index.html to:
• disable auto-play when website opens
• allow auto-play only when the modal window is opened?

Here's the html for the modal window:

<div id="modalwindow1" style="display:none;">
   <div class="help1">
       <img src="help window.png" height="570" width="1000" alt="Help">
       <div class="help2">
           <video width="700" height="300" controls autoplay>
               <source src="filename.mp4" type="video/mp4">
               Your browser does not support the video tag.

BC AdBot (Login to Remove)


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users