How to play VIDEO with MUSIC in background FULL SCREEN?

I found this post:

I try to copy the code to my homepage and doesn’t work. I copy the HTML , de CSS and JS in 3 diferent archives. Do I need any other library ? I have no idea in JS and codes :smile:
I use Wordpress & Elementor, Code Snippets for insert code JS and CSS.

I want to make a landingpage with a full video with music in foreground 100% responsive if possible and only one button ( Call To action ) to enter website.

Firstly, welcome to the forums.

While we are primarily here to help people with their Free Code Camp progress, we are open to people on other paths, too. Some of what you are asking is pretty trivial in the Free Code Camp context, so you might find that if you’re not getting the instruction and material you need in your current studies, the FCC curriculum will really help you get started. At a modest guess I’d say investing a 4-5 hours working through the curriculum here will really pay off. You can find the curriculum at https://www.freecodecamp.org/learn.

With your current questions, we don’t have enough context to know what you already know or don’t know, so it is impossible to guide you without just telling you the answer (which we won’t do).

It is pretty typical on here for people to share a codepen / repl.it / jsfiddle example of what they have tried so that anyone helping has more of an idea of what help is actually helpful.

Please provide some example of what you’ve tried and I’m sure you’ll get more help.

Happy coding :slight_smile:

I make this 3 archivs:
HTML:

<audio src="https://www.bensound.com/bensound-music/bensound-moose.mp3"></audio>
<button id="button">
  <i class="fas fa-volume-up"></i>
</button>
<p>Music: www.bensound.com</p>

CSS:

body {
  background: url(https://images.unsplash.com/photo-1526500141527-9e9b0ae48227?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1950&q=80);
  background-size: cover;
  background-repeat: no-repeat;
  height: 100vh;
  position: relative;
  margin: 0;
}

audio {
  display: none;
}

p {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: rgba(238, 238, 238, 0.6);
  font-size: 20px;
}

button {
  font-size: 16px;
  color: #eee;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 50px;
  padding: 15px;
  border: none;
  border-radius: 2px;
  outline: none;
  background: rgba(115, 67, 167, 0.8);
  box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
  opacity: 0.8;
  cursor: pointer;
  transition: all 0.4s ease-out;
}

button.fade:hover {
  opacity: 0.8;
}

.fade {
  opacity: 0.2;
  top: 0;
  left: 0;
  transform: translate(0, 0);
}

and JS:

const button = document.querySelector("#button");
const icon = document.querySelector("#button > i");
const audio = document.querySelector("audio");

button.addEventListener("click", () => {
  if (audio.paused) {
    audio.volume = 0.2;
    audio.play();
    icon.classList.remove('fa-volume-up');
    icon.classList.add('fa-volume-mute');
    
  } else {
    audio.pause();
    icon.classList.remove('fa-volume-mute');
    icon.classList.add('fa-volume-up');
  }
  button.classList.add("fade");
});

And the content does not reproduce like the example:
https://codepen.io/freeCodeCamp/pen/MWyBapv

I would like to know if I forget some any code to add ? CSS or JS files ¿?