From the course: Learning Web Audio and Video

Unlock the full course today

Join today to access over 22,500 courses taught by industry experts or purchase this course individually.

Use embedded media

Use embedded media

From the course: Learning Web Audio and Video

Start my 1-month free trial

Use embedded media

- [Instructor] We can also use iframe elements to embed externally hosted media content directly within our html from any service that supplies and allows cross-domain embed codes. Let's go ahead and add that to our body, and we'll place it directly after our download video file link, we'll put some space in there, and scroll down a bit, and the first thing I'll actually put in here is a horizontal rule, so an HR element just to separate both of these. With that done, we'll now insert an iframe that points to our video. So establishing an iframe element will set a src, or source attribute, and this is going to point to the exact same spot that our anchors point to. Media/video.mp4. We'll also set a direct width and height for this iframe, so we'll set the width equal to 640 pixels, and we'll set the height to 360 pixels. With that done we'll close out our iframe and hit Cmd or Ctrl + S to save. Notice that I have my live server still running on port 5500, but if it wasn't running…

Contents