skip to Main Content

Having this code only once on the page works perfectly but using it several times for multiple videps has all the videos frozen.

How can I have all of them play on one page?

<video id="video1" width="100%" height="100%" autoplay loop>
  <source src="videos/Utopia-Pt1-Intro.mp4" type="video/mp4" >
 
  Your browser does not support HTML video.
</video>

Does adding an id help?

I don’t want to use Vimeo or Youtube embeds.

2

Answers


  1. No, adding id does not solve the current problem. It is because browsers do not allow multiple video playback to prevent sound mixing. However, if you want to play all the videos simultaneously, you can add the mute attribute to the videos.

    Login or Signup to reply.
  2. To resolve the issue with multiple videos freezing on the same page, ensure that each video element has a unique ID. Additionally, adding the muted attribute to each video will allow them to autoplay without being blocked by the browser. Here’s an example of how you can set it up:

    Your browser does not support HTML video.

    Your browser does not support HTML video.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search