Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Duncan Krassikoff
12,181 PointsEmbedded Elements - Browsers won't load video
Hi guys,
I'm currently on the Embedded Elements video. I've copied the same embed text into my HTML that's used in the video ("Charlie bit my finger..."), but it won't load the video in both Google Chrome & Firefox. I do have the current version of flash. Here's my code:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>My Page</title>
</head>
<body>
<object width="420" height="315">
<param name="movie" value="//www.youtube.com/v/_OBlgSz8sSM?version=3&hl=en_US"></param>
<param name="allowFullScreen" value="true"></param>
<param name="allowscriptaccess" value="always"></param>
<embed src="//www.youtube.com/v/_OBlgSz8sSM?version=3&hl=en_US" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed>
</object>
</body>
</html>
Can anyone explain what I'm doing wrong?
Thanks
Derek Parry
3,080 PointsI'm having the same problem here. I've added "http:" before the link in the embedded object, and it is still not showing up. I'll try to paste my code below: '''html <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>HTML Practice</title> </head> <body>
<object width="420" height="315"><param name="movie" value="http://www.youtube.com/v/_OBlgSz8sSM?version=3&hl=en_US&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/_OBlgSz8sSM?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed></object>
</body> </html> '''
Derek Parry
3,080 PointsHaving the same problem, even after including "http:" before the link. '''html <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>HTML Practice</title> </head> <body>
<object width="420" height="315"><param name="movie" value="http://www.youtube.com/v/_OBlgSz8sSM?version=3&hl=en_US&rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="//www.youtube.com/v/_OBlgSz8sSM?version=3&hl=en_US&rel=0" type="application/x-shockwave-flash" width="420" height="315" allowscriptaccess="always" allowfullscreen="true"></embed></object>
</body> </html> '''
3 Answers
Duncan Krassikoff
12,181 PointsAlright, so I had my friend set up a server to test this. I published the code above and the video showed up fine, but I still have no idea why it isn't showing up when I'm loading the page from my computer, not through a server.
Can anyone elaborate?
James Barnett
39,199 PointsProtocol-less URLs don't work without a web server, so in that case just add http: in front of the URL.
The main caveat to keep in mind when using the protocol-less reference is that it will fail on pages loaded via file:/// (i.e. HTML pages you load directly from disk to your browser). So, do be sure to include the http: protocol in the URL if you happen to be developing without a web server at all, but don’t worry about omitting it otherwise.
source: http://encosia.com/3-reasons-why-you-should-let-google-host-jquery-for-you/
Mel Warhol
Courses Plus Student 7,859 PointsHaving the same issue...what did you do to fix it?
Duncan Krassikoff
12,181 PointsSee above. Sorry for the confusion!!!
Duncan Krassikoff
12,181 Points- -
Abraham Thomas
2,406 PointsBoth URL's in the code are missing http://
Should be value="http://www.youtube.com..."
Duncan Krassikoff
12,181 PointsDuncan Krassikoff
12,181 PointsCode should display in this thread.
edit: Code for the exercise should display in this thread for other users to comment on (I was having issues getting it to show in my post). Embedded youtube video still not showing up in my browser though.