<video ...> ... </video> doesn't work for YouTube video

Viewed 34

Good morning everyone,

I am using Firefox. I can run <video ...>... with src="https://storage.googleapis.com/geteachkml4/npr/boxesEdit2.mp4" and it's video.

If I change to (click share then embed and copy the iframe source):

src="https://www.youtube.com/embed/Z-h2UER3b_0"

I am getting an error:

"A video of the supported format and MIME type was not found."

Why can't I use YouTube video? Where can I put my clip?

Regards

1 Answers

The video src attribute is expecting a link to a video file but the YouTube link is to a full web page - i.e. is is a link to a HTML5 file not a video file.

The YouTube page includes a video element but the src attribute will not know this and will not search for it.

YouTube generally does not want you to play their videos without using the YouTube player so they don't provide anyway to access to video file directly. Third party tools do exist to extract the video url but they may not be well supported and there may be copywriter issues.

Related