Back to Freecodecamp

Step 9

curriculum/challenges/english/blocks/workshop-html-video-player/68f268880219c2485bd71d2a.md

latest1.3 KB
Original Source

--description--

To specify the media resource for the video, you will need to add the src attribute to the source element.

Add the src attribute with the value https://cdn.freecodecamp.org/curriculum/labs/what-is-the-map-method-and-how-does-it-work.mp4.

--hints--

Your source element should have a src attribute.

js
const source = document.querySelector('source');
assert.isTrue(source?.hasAttribute('src'));

Your source element should have a src attribute with the value https://cdn.freecodecamp.org/curriculum/labs/what-is-the-map-method-and-how-does-it-work.mp4.

js
const source = document.querySelector('source');
assert.strictEqual(source?.getAttribute('src'),
'https://cdn.freecodecamp.org/curriculum/labs/what-is-the-map-method-and-how-does-it-work.mp4');

--seed--

--seed-contents--

html
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Working with the HTML Video Element</title>
</head>
<body>
  <h1>Working with the HTML Video Element</h1>
  <video
    width="640"
    loop
    controls
    muted
    poster="https://cdn.freecodecamp.org/curriculum/labs/past-event2.jpg"
  >
--fcc-editable-region--
    <source>
--fcc-editable-region--
  </video>
</body>
</html>