Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

YouTube Playlist

9 replies [Last post]

Hi everybody

I need help here, I am trying to pull some videos from Youtube with a play list.

I'am currently using kickapps for that but I wonder if it's possible to do the same thing with The JW Player.

Here you can see what I am using for that right now

http://seethesoo.com/Tv/

I downloaded the d-playlist and everything works fine with my own videos and crating manually an xml file specyfing name, thumb and length.

I tried to replace the xml path with a youtube URL and obviously it doesn't work.

How can I load videos from youtube and display them in my plug in (thumbs) and then when the user click on it , the player would play that video?

I don't want to play every video in a different page , I want to play the video in the same player.

I am tired, I expended more than 5 hours looking in different threads and nothing.

Am I using the right plug in?

Is it possible or not?

If yes, can you guide me ?

If some body can do it for me I will pay for the code.

Thank you very much

 
You have to tell the player that the type is "youtube".

Look at the first item in the Editor's Choice playlist titled "Панорамный". It should play a YouTube video.

    http://willswonders.myip.org:8074/Simple_D-Playlists.html

That is what I have already, my point is that I don't know how to refer the youtube playlist.

If I just copy and paste the url from youtube whre the first item in the Editor's Choice playlist ,nothing happens.

Thank you

 
The example does work!

Did you look at the page source of Simple_D-Playlists.html and the playlist choice.xml to see how it is being done?

The example works, I would like to do something like that.

I don't know if the problem is here in my code.

This is my player code:

<script type="text/javascript" src="http://mysite.com/espanol/player/swfobject.js"></script>
<script type="text/javascript">
swfobject.registerObject("player","9.0.0");
</script>
<div name="mediaspace" align="center" id="mediaspace">
<object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8" name="player" width="590" height="472">
<param name="wmode" value="transparent">
<param name="movie" value="http://mysite.com/espanol/player/jwplayer.swf" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value="plugins=dplaylists-1&dplaylist.sdskin=http://mysite.com/espanol/player/Playlist.swf&dplaylists.dposition=center&dplaylists.dxmlpaths=http://mysite.com/espanol/player/related.xml&dplaylists.dxmlpaths=http://mysite.com/espanol/player/choice.xml,latest.xml&file=http://videos.mysite.com/english/'video.flvℑ=http://mysite.com/images/art/others/player.jpg&skin=http://mysite.com/espanol/player/blue.swf"/>
<p><a href="http://get.adobe.com/flashplayer">Get Flash</a> to see this player.</p>
</object>
</object>

Now this is how I am trying to call the play list from you tube: (It opens Youtube site and pays the video there not in my player)

Example on my choise XML file

<video id="001">
<title><title>Night of the Living Dead</title></title>
<thumb>http://mysite.com/images/thumb.png</thumb>
<url>http://www.youtube.com/watch?v=VkWvCIyoQDk</url>
<duration>1:31</duration>

Thank you very mucho

 
Look at the page source of: http://willswonders.myip.org:8074/Simple_D-Playlists.html

Find the function: loadNplay(file, type)

Look at the choice.xml playlist at: http://willswonders.myip.org:8074/dplaylists/choice.xml

Find:    <url>javascript:loadNplay('http://www.youtube.com/watch?v=i0SY5KMTo8s&feature=fvhl', 'youtube')</url>

That's how it works.

This one right ?

function loadNplay(file, type)
{
if(!type) type = 'video';
alert('Type: ' + type);
player.sendEvent('LOAD', {file:file, type:type});
player.sendEvent('PLAY', 'true');
};

Where shoul I place it?

I tryed different places and I can't make it work , the code on that example is different than mine.

Sould I type something like

<param name="loadNplay"

or add

loadNplay=youtube

to the variables?

I don't know to much about JS code

By the way my choice XML file looks like this :

<url>javascript:loadNplay('http://www.youtube.com/watch?v=i0SY5KMTo8s&feature=fvhl', 'youtube')</url>

 
You need to put the whole block of JavaScript code in the head element of your HTML document. It enables the JavaScript API. Also, make sure that your object element has both name and id attributes.

All of this code:

    <script type="text/javascript">
      var player = null;

      function playerReady(obj)
      {
        player = gid(obj.id);
      };

      function loadNplay(file, type)
      {
        if(!type) type = 'video';
alert('Type: ' + type);
        player.sendEvent('LOAD', {file:file, type:type});
        player.sendEvent('PLAY', 'true');
      };

      function gid(name)
      {
        return document.getElementById(name);
      };
    </script>

Then, if you're still stuck, post a link to your Test Page and I'll help you sort it out.

Thank you very much hobbs

I tryed that code and nothing. But I just found that with the Wizard you can import the play list by just coping and pasting.

lol..

I expended hours on this for something that was already there.

Thank you again

pelase Carlos can you give me the name of web site make that

Wizard you can import the play list by just coping and pasting