Build an HTML Audio and Video Player - Build an HTML Audio and Video Player

Tell us what’s happening:

It is telling me i need a source and a source type I am not sure what I am missing

Your code so far

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <title>HTML Audio and Video Lab</title>
</head>
<body>
<h1>Build a player</h2>
<section>
  <h2>Coding for beginners</h2>
  <video source src="https://cdn.freecodecamp.org/curriculum/labs/What is the map method and how does it work.mp4" loop controls width="640"></video>
</section>
<section>
  <h2>We are going to make it</h2>
  <audio source src="https://cdn.freecodecamp.org/curriculum/js-music-player/we-are-goin-to-make-it.mp3" loop controls></audio>
</section>   
</body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36

Challenge Information:

Build an HTML Audio and Video Player - Build an HTML Audio and Video Player

you may want to review the theory lesson

source is an element you can use with video and audio, in this case you are asked to use it with video

2 Likes

Thank you, I was getting confused on those but I went back and have a little bit better handle on things. Thanks for the reply.

Tell us what’s happening:

I am sorry I just don’t see what I am missing. It is telling me my video is missing a source, a source type, and needs a valid link but the video shows up please help I am sure it is something easy

Your code so far

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
  <title>HTML Audio and Video Lab</title>
</head>
<body>
<h1>Build a player</h1>
<section>
  <h2>Coding for beginners</h2>
  <video source src="https://cdn.freecodecamp.org/curriculum/labs/What is the map method and how does it work.mp4" loop controls width="640"></video>
</section>
<section>
  <h2>We are going to make it</h2>
  <audio source src="https://cdn.freecodecamp.org/curriculum/js-music-player/we-are-goin-to-make-it.mp3" loop controls></audio>
</section>   
</body>
</html>

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36

Challenge Information:

Build an HTML Audio and Video Player - Build an HTML Audio and Video Player

  • here “video” tag is an “element”, where as “src” is an “attribute”
  • you’re simply trying to add source attribute without any value in it, instead of a source element within video element.

for more about how “video” element is defined in html you might want to look at this mdn docs, happy coding :slight_smile: <video>: The Video Embed element - HTML | MDN

2 Likes

Thank you so much I seem to always get tripped up on the source for video and audio but I am finally getting it now.

2 Likes

I merged your two topics, please do not create multiple topics for the same challenge

Thank you and sorry about that my computer actually froze on me and it didn’t register it created so it created twice my apologies.