Question

I know this question already have been asked. But I could not find any good answers.I want to embedd my youtube channel direct to my site, so the visitor can view initially the latest video I have uploaded, then there should be playlist with all other videos from my channel (this is importan to be only from my channel). Can anyone suggest something?

Was it helpful?

Solution

Youtube automatically creates an RSS of the latest videos added to your website..

http://gdata.youtube.com/feeds/api/users/your-channel-name/uploads?orderby=updated

How to fetch and extract (parse) the content is well documented across the web but here's a demo that will automatically embed your latest video. http://lovelogic.net/z_tuts/ytgrab1.php All the code is included.

This demo was originally written for a client who did not have server-side scripting so it uses a Yahoo Pipe to fetch and , filter and process the RSS feed. There's no easy way to document them so here's a picture http://lovelogic.net/z_tuts/ytgrab2.php several others are piggybacking on the demo pipe so it's a good idea to make your own (it's a free service)

If you remove the 'truncate' module from the pipe it will send a list of all the video using a JSON formatted string..

latest= (data.value.items[0].content);
first = (data.value.items[1].content);
second= (data.value.items[2].content);
third = (data.value.items[3].content);
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top