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.
Blog archief
- » Maart 2010 (1)
- » Februari 2010 (1)
- » Augustus 2009 (1)
- » Juni 2009 (2)
- » Mei 2009 (2)
- » Maart 2009 (3)
- » Februari 2009 (3)
- » Januari 2009 (4)
Blog categorie
- » Klanten (1)
- » Eigen projecten (5)
- » Webnieuws (2)
- » Kantoor (2)
- » Showcase (2)
- » API's en Classes (1)
- » Scripts/Software (4)
Blog links
- » tweakers.net Nieuws
- » tweakers.net Menutracker
- » Source Forge
- » MSDN HTML and DHTML Reference
- » IE7+ Knowledge Base
- » Sprout, inspireert ondernemers
- » WebWereld, laatste ICT nieuws
- » Panda ActiveScan 2.0
Google Translate
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





