tags:

views:

25

answers:

1

hi hello i'm new in this forum and new in youtube i also created a sample let me tell the steps copied a sample youtube html script from http://groboclown.net/yt_playlist/howto-embed-long.html

and on clicking the sampl.html it just show the youtube player black color that all what is the problem i put an alert in the onYouTubePlayerReady() { but its not printing any thing WHY? how can i do the youtube embeddig please help me any body how can i do it is a webserver as (tomcat or jboss etc)is always needed for it then how can do this please help me any body can

A: 

The simplest way to embed a youtube on a webpage is to use the embed code provided on the youtube page the video is on. It normally looks like this:

<object width="640" height="385"><param name="movie" value="http://www.youtube.com
/v/ZZZZZZZZZZZ&amp;hl=en_US&amp;fs=1"></param><param name="allowFullScreen" value="true">
</param><param name="allowscriptaccess" value="always"></param><embed 
src="http://www.youtube.com/v/ZZZZZZZZZZZ&amp;amp;hl=en_US&amp;amp;fs=1" type="application/x-
shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385">
</embed></object>

Where ZZZZZZZZZZZ is the video id.

The script you are using is for creating youtube playlists. It is possible they are not playing because either embedding is disabled for the video you are trying to play, or the actual URL is invalid. Youtube video IDs have a specific length, and most frequently, people mistake the ID field as the whole URI. It is not, and a Gdata resource of http://www.yout makes a very poor youtubeID.

I would suggest getting the firebug plugin for firefox to check for errors and monitor the javascript calls to make sure they are actually being called when clicked.

If you are using the youtube API, check your server log to see if the incorrect Gdata resource is being cUrled, otherwise this will = FAIL.

Normally, youtube videos are in an .flv file format, so re-embedding the video in a separate flash player might cause it to not work properly if the direct URL to that file is not accessible. Normally the raw .FLV is never accessable because this in turn is separate sub-FLV embedded within the youtube player flash object.

Talvi Watia