how do I get the background video to play

video background play fix
background video css
video background play fix chrome
responsive video background
play youtube in background
youtube background app download
html5 video background examples
css background video cover

The background video I'm using isn't working. I'm not sure if it's my code or just the video.

This is the video.

video#bgvid {
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  background-size: cover;
}
<video id="bgvid" autoplay>
  <source src="bar.mp4" type="video/mp4">
</video>

You might find this useful, https://www.youtube.com/watch?v=05ZHUuQVvJM

I used this when I first wanted to have a video as my background

Video Background Play Fix – Get this Extension for 🦊 Firefox (en-US), Some sites may not work with Firefox for Android video background play feature. This add-on provides a quick fix by blocking the Page Visibility  Website Video Background. Get Useful Information In Seconds. Visit Today & Quickly Get More Results On Fastquicksearch.com!

If the path to the video is correct, check the following hints.

Depending of browser and system, you will need to add some attributes to your video tag.

The most common way to allow video's autoplay on Chrome is to add the mute attribute to video tag :

<video id="bgvid" autoplay mute>
 <source src="bar.mp4" type="video/mp4">
</video>

The way to allow video's autoplay on iOS now, is to add the playsinline attribute to video tag :

<video id="bgvid" autoplay mute playsinline>
 <source src="bar.mp4" type="video/mp4">
</video>

You can find here Autoplay Policy of Chrome and here New Policies for iOS to help you.

How to Play YouTube Videos in the Background, Watch all videos from YouTube while you continue to use your smartphone normally with Minimize Floating Popup Player. You can play and save videos and  Easy Access to Free Zoom Background Sites with TemplatesDiscoveryTab™ Extension. Quick Access to Free Image & Video Background Sites from Your New Tab

I think this howto page in W3Schools gives a quite clear example of what you need.

In case link dies, I also embed the solution here (just changed the video source path to make it work here)

// Get the video
var video = document.getElementById("myVideo");

// Get the button
var btn = document.getElementById("myBtn");

// Pause and play the video, and change the button text
function myFunction() {
  if (video.paused) {
    video.play();
    btn.innerHTML = "Pause";
  } else {
    video.pause();
    btn.innerHTML = "Play";
  }
}
 /* Style the video: 100% width and height to cover the entire window */
#myVideo {
  position: fixed;
  right: 0;
  bottom: 0;
  min-width: 100%;
  min-height: 100%;
}

/* Add some content at the bottom of the video/page */
.content {
  position: fixed;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #f1f1f1;
  width: 100%;
  padding: 20px;
}

/* Style the button used to pause/play the video */
#myBtn {
  width: 200px;
  font-size: 18px;
  padding: 10px;
  border: none;
  background: #000;
  color: #fff;
  cursor: pointer;
}

#myBtn:hover {
  background: #ddd;
  color: black;
} 
 <!-- The video -->
<video autoplay muted loop id="myVideo">
  <source src="https://www.w3schools.com/howto/rain.mp4" type="video/mp4">
</video>

<!-- Optional: some overlay text to describe the video -->
<div class="content">
  <h1>Heading</h1>
  <p>Lorem ipsum...</p>
  <!-- Use a button to pause/play the video with JavaScript -->
  <button id="myBtn" onclick="myFunction()">Pause</button>
</div> 

How to Play YouTube Videos in the Background on Android and iOS , Do you have music videos but you can't "just listen" to them? Doesn't your video player allow you to minimise videos? OR gives an add pause while restarting  Browse our new video library today. Adobe Stock has the videos you need!

Minimize play in background - Video Mini, Closing the YouTube app will stop the video from playing, but there are a Playing YouTube videos in the background in Android can be done  How to change your video chat background in Microsoft Teams. 1. Start or or join a Teams meeting, from the Windows or Mac application (you can't change your background on the web app at this point). 2. At the bottom of the screen, click or tap the three dots to go to your Meeting controls . 3.

BG video - floating video - background video, YouTube stops playing when you switch to another app or turn off the screen. Here are some tricks to keep those videos playing in the  Playing videos in certain browsers (iOS) First, navigate to YouTube from your browser of choice. Then, search for your chosen video. Once you’ve found and opened your video, change over to the desktop version of the site. Note: This will vary depending on which browser you Start your video

How to Play YouTube in the Background on Android and iOS , You can play free YouTube videos in the background on Android phones and iPhones — but it's tricky. You can enable PiP for Android or use  On an Android phone. While you’re in Chrome, go to the YouTube website. (This has to be done using a mobile browser, so make sure you’re in the website and not the Find the video you want to play. Tap on the three dots in the upper-right corner of the screen, and then select “Desktop site” from

Comments
  • Please supply an example of your code. Both html and css.