Why does YouTube link not work?

Hi there!
I’ve tried to expand my lesson in NYC Blog with tags like article and video. But the YouTube video is not displayed. Whether I used additional attributes or not, nothing changed.

I found out that a YouTube service has a special button to put its videos on any website.
For example, (iframe width=“904” height=“508” src=“YouTube” title=“Summer Streets 2023 Teaser” frameborder=“0” allow=“accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share” allowfullscreen></iframe)

But I want to figure out if I can don’t use its link and display video without it.
Does someone know?

So the only way to embed a video in a website (without breaking YT’s ToS) is to use their iframe tag, you can’t pass a YouTube video to a <video/> tag like any other video, as that only works when you directly have access to the video file, ending in an extension like .mp4, etc (which in YouTube’s case you don’t, as they don’t give access to these to prevent people from downloading videos and creators/the platform losing ad revenue)

4 Likes

Thank you for your help! Yeah, later I noticed that message about I don’t have permission to post it …
It’s also interesting to see other tags like iframe.

Also, after I post this topic, I accidentally found a way how can insert it without their full code on my website.
I noticed that I put a link with the words “…tube.com/embed/00F…” and it pushed me to try to use the embed tag which I learned a while before. What was exciting to me the video with this link worked :smiley:
Of course, I didn’t copy the direct link from the YT page but used a part of that long code that they provide. So, most likely the direct link doesn’t work in this case. Need to try ( interesting :D).

Hey! If you’re having trouble embedding YouTube videos on your NYC Blog, remember to use YouTube’s tag for embedding. Unfortunately, you can’t directly use the video tag. Simply grab the code snippet from YouTube and paste it into your blog post. Let me know if you need more help!