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

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 / / 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:

<audio src=""></audio>
<button id="button">
  <i class="fas fa-volume-up"></i>


body {
  background: url(;
  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;;
  } else {

And the content does not reproduce like the example:

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