I’m relatively new to the forum so forgive me if this is a naive question or something that’s been asked a billion times before. This is fairly straightforward, so I’m sure it’s come up here before… However, I ran a search and didn’t find anything.
Basically, I can’t get Youtube video embeds to work in HTML5 documents.
If I just run a normal (X)HTML document, starting with this formatting:
I can run a youtube embed like, <iframe width=“420” height=“315” src=“//www.youtube.com/embed/oUjUTG3hwyQ” frameborder=“0” allowfullscreen></iframe> and it will show perfectly.
I won’t get a video. Instead, in Chrome, it will say “the file or directory cannot be found.” In internet explorer, it will say “page cannot be displayed.”
That is the actual code YouTube supplies, and it works OK—but I think the page has to be online for it to work. Locally (for testing purposes) you may indeed need to add in the http:// bit.
The missing “http” is done on purpose: the URL may be HTTP, or it may be HTTPS. This can allow the browser or an app to choose which is used instead of hardcoding it.