These forums are currently read-only due to receiving more spam than actual discussion. Sorry.

It is currently Sat Dec 02, 2017 4:24 pm Advanced search

HTML5 video tag and Youtube

If you are stuck or have questions regarding HTML or other Web technologies, ask your questions here. No question too dumb!

HTML5 video tag and Youtube

Postby eZACKe » Sun Aug 21, 2011 2:51 am

I don't understand what needs to be done differently to make this work:

Code: Select all
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="utf-8" />
  <meta name="robots" content="noindex" />
  <title>My Weblog</title> 
</head>

<body>
<video width="640"  height="360" src="http://www.youtube.com/v/7_6B6vwE83U"  controls autobuffer> </video>
</body>
</html>


I've tried running this in Chrome, FF, and Safari and it doesn't work in either. Is this how you take a video from Youtube and use it within the video element, or am I missing a step?

In Safari and Chrome the video first shows the controls and then they disappear and you clicking on the Play icon does nothing. In FF it just shows a gray screen with a X in it.

Just started experimenting with HTML5 and can't quite understand this. Thanks for the help!

EDIT: Just worth mentioning that if I go the HTML4 approach it works in all 3 browsers:
Code: Select all
<object type="application/x-shockwave-flash" style="width:425px; height:350px;" data="http://www.youtube.com/v/7_6B6vwE83U"><param name="movie" value="http://www.youtube.com/v/7_6B6vwE83U" /></object>
eZACKe
<h6>
 
Posts: 2
Joined: Sun Aug 21, 2011 2:47 am

Re: HTML5 video tag and Youtube

Postby JAB Creations » Sun Aug 21, 2011 10:27 pm

I think the problem is that you're loading the Flash container that itself loads the video source file(s) subjective to what resolution you load (e.g. 240,360, 720, 1080). I think you'll have to figure out how YouTube automates that and choose which resolution to use. Offhand I don't know if that will require either client or server side scripting though I wanted to at least point you in the correct direction. :)
User avatar
JAB Creations
<aside>
 
Posts: 566
Joined: Tue Mar 13, 2007 4:48 am
Location: Sarasota Florida, USA


Return to Help & Advice

Who is online

Users browsing this forum: No registered users and 0 guests