Web Design Forum: Validating YouTube Embed - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Validating YouTube Embed

#1 User is offline   Ciwan 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 391
  • Joined: 02-January 09
  • Reputation: 0
  • Location:UK
  • Experience:Beginner
  • Area of Expertise:I'm Learning

Posted 04 January 2010 - 07:15 PM

Hi Guys

A friend of mine once said there was a website where you can paste the embed code from youtube and it will give you an alternate embed code that validates.

I have been searching for the site .. but I can not find it anywhere.

I'd greatly appreciate a link.

Thank You.
0

#2 User is offline   Wickham 

  • Web Guru
  • View gallery
  • Group: Moderators
  • Posts: 2,875
  • Joined: 11-June 09
  • Reputation: 257
  • Gender:Male
  • Location:Salisbury UK
  • Experience:Intermediate
  • Area of Expertise:Web Developer

Posted 04 January 2010 - 07:29 PM

It's the embed tag in normal codes for video .swf files in a web page like YouTube uses that doesn't validate.

You can use just an object tag like item 2 here
http://www.wickham43.../flashvideo.php
and this does validate but it won't work unless a computer has Adobe Flash Player already installed. This used to be a problem, but new computers nearly all do have Flash Player pre-installed.

The normal method with an object tag and nested embed tag works on old computers but doesn't validate.
0

#3 User is offline   Ciwan 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 391
  • Joined: 02-January 09
  • Reputation: 0
  • Location:UK
  • Experience:Beginner
  • Area of Expertise:I'm Learning

Posted 04 January 2010 - 10:02 PM

Thanks Wickham

So no site ?

also where does the URL of the youtube video go ?

<div style="width: 500px; margin: auto;">
<object type="application/x-shockwave-flash"
style="width: 120px; height: 100px; margin: auto;"
id="VideoPlayer" data="yourvideo.swf">
<param name="allowScriptAccess" value="sameDomain" >
<param name="movie" value="yourvideo.swf" >
<param name="quality" value="high" >
<param name="scale" value="noscale" >
<param name="bgcolor" value="#ababab" >
<p><a href="http://www.adobe.com/go/getflashplayer">Install Adobe Flash For Richer Experience</a></p>
</object>
</div> 


Thanks
0

#4 User is offline   Gareth Daine 

  • Web Guru
  • Group: Platinum Membership
  • Posts: 1,646
  • Joined: 01-November 08
  • Reputation: 26
  • Gender:Male
  • Location:Cumbria, UK
  • Experience:Web Guru
  • Area of Expertise:Designer/Coder

Posted 04 January 2010 - 10:37 PM

Use the code below. Replace the data, value, width and height properties with your YouTube URL, width and height.

<object type="application/x-shockwave-flash" width="YOUR WIDTH" height="YOUR HEIGHT" data="YOUR YOUTUBE URL"><param name="movie" value="YOUR YOUTUBE URL" /></object>


Hope this helps. :)
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users