[SOLVED] doesn’t work for YouTube video

Issue

This Content is from Stack Overflow. Question asked by Hien Thanh

Good morning everyone,

I am using Firefox. I can run 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.”

Same with <iframe …> , i.e. works for https://storage.googleapis.com/geteachkml4/npr/boxesEdit2.mp4 and doesn’t work for https://www.youtube.com/embed/ Z-h2UER3b_0

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

Regards



Solution

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.


This Question was asked in StackOverflow by Hien Thanh and Answered by Mick It is licensed under the terms of CC BY-SA 2.5. - CC BY-SA 3.0. - CC BY-SA 4.0.

people found this article helpful. What about you?