jQuery Ceebox with YouTube playlist support

Scripts/Software 08-02-2010

When I decided to use Ceebox, I made the choice based on how easy it was to you Youtube video in a lightbox. But as we all know, projects change while working on them. The biggest change I had to handle was not using single Youtube video's but Youtube playlists.

As soon as I posted an youtube playlist URL, I noticed that the lightbox loaded the page as an iFrame, meaning I didn't get the nice embedded video option.

I took a little look at the jQuery Ceebox plugin and noticed they had a neat solution for detecting the action. All I did was look at the difference between an video and playlist URL and added an option.

Youtube video URL
http://www.youtube.com/watch?p=videocode
Youtube playlist URL
http://www.youtube.com/view_play_list?p= videocode

Added to jQuery Ceebox main JavaScript:
After line 125
youtubelist: {
siteRgx : /youtube\.com\/view_play_list/i,
idRgx: /(?:p=)([a-zA-Z0-9_\-]+)/i,
src : "http://www.youtube.com/p/[id]&hl=en&fs=1&autoplay=1"
},

For more information on Ceebox, click here.

Bookmark and Share    Terug naar overzicht »
Twitter Parcye Parcye Kennisbank
KVK Ondernemers Panel
Parcye Blog

Parcye adres

Lijmbeekstraat 196
5612 NJ Eindhoven
Nederland

T: +31 40 842 1947
M: +31 645 48 6312
F: +31 87 784 6350


 

KVK: 1716 0110 te Eindhoven