When I embed a YouTube video in an iframe, the video doesn't play. I get a "video unavailable. Watch on youtube" error message. ONLY if the YouTube video is licensed.
For example, pretty much anything uploaded by VEVO.
Non licensed videos will embed fine.
Well I noticed 2 things. If you ever heard of twitch tv and nightbot tv, nightbot has a song request feature where users can submit YouTube links and the link will be embedded on the night bot page and play whether the video is licensed or not.
I also noticed w3schools has a page about YouTube embeds. If I use their sandbox IDE and try to embed a licensed YouTube video, it plays fine.
So why is it that w3schools and nightbot tv and im sure a million other websites embed licensed YouTube videos without issues but when I copy the same exact code into a html document and view it in Chrome, I get a video playback error?
```
<! DOCTYPE html> <html> <body> <iframe width="420" height="345" src="https://www.youtube.com/embed/dvgZkm1xWPE"> </iframe> </body> </html>
```
[link] [comments]
No comments:
Post a Comment