jQuery Ceebox with YouTube playlist support
08 feb 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
Youtube playlist URL
After line 125
siteRgx : /youtube\.com\/view_play_list/i,
src : "http://www.youtube.com/p/[id]&hl=en&fs=1&autoplay=1"
For more information on Ceebox, click here.
Door Colin Myerscough
comments powered by Disqus