Solksjaer Solksjaer - 3 months ago 8
HTML Question

Embeded YouTube videos not loading

our current implementation for YouTube videos use the standard Tag from the API Documentation and it´s no longer loading correctly.
It shows only an empty Object with a link to the YouTube page.

I created an example using the code from the docu and the error is reproduceable.

Does anybody knows if there is another way to use the embeded Code from YouTube?

Thanky you very much in advance.

Here is the example code:

<!DOCTYPE html>
<html>
<head>
<title>Page Title</title>
</head>
<body>

<h1>This is a Heading</h1>
<p>This is a paragraph.</p>
<object width="640" height="390">
<param name="movie"
value="https://www.youtube.com/v/M7lc1UVf-VE?version=3&autoplay=1"></param>
<param name="allowScriptAccess" value="always"></param>
<embed src="https://www.youtube.com/v/M7lc1UVf-VE?version=3&autoplay=1"
type="application/x-shockwave-flash"
allowscriptaccess="always"
width="640" height="390"></embed>
</object>

</body>
</html>

Answer
You don't need all those thing just do it like this..

<object width="420" height="315"
data="http://www.youtube.com/v/XGSy3_Czz8k">
</object

> OR

<embed width="420" height="315"
src="http://www.youtube.com/embed/XGSy3_Czz8k">