/home

Embedding YouTube Videos and Other Media

Created: Monday 8 July 2024 at 9:00 am

Updated: Monday 8 July 2024 at 9:00 am

A sample file to show how to embed media in CaC.


You can embed YouTube videos and other media in CaC, here is some examples of how it works and how is can be used in CaC.

General Guidelines

Images, videos, and gifs shouldn't be added to the Git repo of your course. Adding media files to the repo will result in its size getting exponentially large with every added file and will make contributing difficult.

For now make sure to upload your videos to your favourite hosting service. YouTube is a great platform for videos, and Imgur is great for images. Both support private (unlisted) media where you can only find said media through a provided link.

Embedding Images

Inline style

![alt text](image path or link)

cute doggo

cute doggo gif

Reference style

![alt text][logo]

[logo]: image path or link

dance

Clickable Images

while you can't embed YouTube videos (except using an iframe )directly, you can embed a clickable image that will open the video in a new tab:

[![alt text](image path or link)](video link)

Piano Cat

Embedding YouTube Videos

Using Youtube Frame

this is the as clickable images but using the first frame of the video instead of an image:

[![Image_alt](https://img.youtube.com/vi/<VIDEO_ID>/0.jpg)](https://www.youtube.com/watch/?v=VIDEO_ID)

[![image_alt](https://img.youtube.com/vi/dQw4w9WgXcQ/0.jpg)](https://www.youtube.com/watch?v=dQw4w9WgXcQ)

image_alt

Using iframe

Embedding Audio

Using links

[audio name](audio link)

audio

Using HTML

<audio controls> <source src="audio link" type="audio/mpeg"> </audio>