• Home
  • Services
  • Profile
  • Portfolio
  • Contact
  • Links
  • Blog
  • Archives
  • Sitemap
Subscribe: Posts | Comments | E-mail
  • Ajax XMLHttpRequestAsynchronous HTTP Request How To's
  • FreebiesBest Freebies Collection
  • MiscellaneousNews, Announcements & General Stuffs
  • Print & Web DesignPhotoshop, Vector, CSS, XHTML
  • ProgrammingProgramming PHP, ASP, .NET and more

Bali Web Design

Posted on October 24, 2007 - by webmaster

Videobox: Lightbox for videos

Web 2.0

Javascript Library

Videobox is yet another modal window which overlays videos in the page. It was inspired from Lightbox.v2 and uses some of the Slimbox’s code. Just like slimbox it is written with mootools library. Videobox used swfobject to embed flash.

Videobox: Lightbox for videos

The usage is pretty simple (just as other modal window) we only need to include mootools javascript library, SwfObject javascript library,and ofcourse the videobox library itself, plus CSS file to control the visualization.

<script src="js/mootools.js" type="text/javascript"></script>
<script src="js/swfobject.js" type="text/javascript"></script>
<script src="js/videobox.js" type="text/javascript"></script>
<link href="css/videobox.css" rel="stylesheet" type="text/css" media="screen" />

to activate it we just need to modify the link to the video file by adding the rel=”vidbox”, and add title=”my caption” to add caption to a videobox.

<a href="http://www.youtube.com/watch?v=uhi5x7V3WXE" rel="vidbox" title="caption">the video</a>
Share this article:
  • Digg
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • LinkedIn
  • MySpace
  • Ping.fm
  • Pownce
  • Slashdot
  • StumbleUpon
  • Technorati
  • Tumblr
  • TwitThis
This entry was posted on Wednesday, October 24th, 2007 at 06:21 and is filed under Web 2.0. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

44 Comments

We'd love to hear yours!



  1. Visit My Website

    March 7, 2008

    Permalink

    Jason said:

    Do you know if this will work with slimbox? I am currently using slimbox to display photo galleries and would like to use this new vidbox plugin for videos.

    I just can seem to get both to play nice :-(



  2. Visit My Website

    March 7, 2008

    Permalink

    Bali Web Designer said:

    Since both are based on mootools you just simply keep the slimbox, and add the videobox (and dependencies files).

    if you want to use 1 for all try lightwindow or lightview

    http://www.nickstakenburg.com/projects/lightview/
    http://www.stickmanlabs.com/lightwindow/



  3. Visit My Website

    March 7, 2008

    Permalink

    Jason said:

    Wow…lightwindow looks like it will do the trick!

    Thank you so much!



  4. Visit My Website

    March 7, 2008

    Permalink

    Bali Web Designer said:

    thanks to kevin *lightwindow creator* :)



  5. Visit My Website

    March 8, 2008

    Permalink

    Jason said:

    Unfortunately I spoke too soon.

    Lightwindow works perfect in Firefox, but I am unable to load YouTube videos in IE7. You mentioned combining slimbox and videobox. I don’t know where to start doing this.

    Can you help?



  6. Visit My Website

    March 9, 2008

    Permalink

    bali web designer said:

    I am so sorry, quite busy at this moment, but i think thats not as difficult as imagine, start by finding videobox code where the parser start in writing embedded flash video using swfobject.

    copy the block to slimbox.js, few codes that may you need is link target file type checker. the codes will have these logics

    - find the slimbox rel attributes
    - loop
    - check if target (href attributes) is image or flash video
    - write slimbox code (image) or flash embedded (videobox)

    but do you test the sample that provided in lightview homepage? is it work in IE7? if it does, the prob is in your codes.. better try it first.

    Good Luck



  7. Visit My Website

    March 11, 2008

    Permalink

    Jason said:

    Thanks. I was able to get Lightwindow working properly. My mistake. I had changed the code a bit and “ahem” forgot to close the code properly.

    Minor oversight on my part. But it is working wonderfully now.

    Thank you for your help and direction :-)



  8. Visit My Website

    March 23, 2008

    Permalink

    Josh Anderson – Optimize Youtube Video said:

    Can anyone tell me how I can modify the code to get the JW player to “autoplay” when playing my own .flv in a videobox?

    Its easy to do with youtube because you can add the command to the ulr but how do you do it with your own hosted flv file using the JW player?



  9. Visit My Website

    March 28, 2008

    Permalink

    Web 2.0 Round up Modal Window Lightbox Effect Library said:

    [...] JQuery Lightbox Plugin Facebox and Balupton edition [...]



  10. Visit My Website

    April 10, 2008

    Permalink

    cypher said:

    Is there any way to use videobox along with lightbox? I want to use videobox for my youtube videos and lightbox 2 for my images.



  11. Visit My Website

    August 3, 2008

    Permalink

    Harry said:

    I’m using Videobox WordPress plugin. Would you please tell me how to “autoplay” the (YouTube) videos?

    Thanks a lot.



  12. Visit My Website

    August 8, 2008

    Permalink

    ace said:

    Hey there,

    Like Harry, I am curious how to a) auto play youtube videos and also b) how to add or get videobox to play the youtube high quality tags &fmt=6 or &fmt=18

    THANKS!



  13. Visit My Website

    September 1, 2008

    Permalink

    sugarflux said:

    Hi Guys

    I’m using videobox with my own hosted .flv files and have been searching for ages on how to autoplay the videos.

    I finally stumbled across the solution trying random variables in various places.

    As i am sending my own .flv files, i am using the line:
    this.so = new SWFObject(this.options.flvplayer+”?file=”+sLinkHref, “flvvideo”, this.options.contentsWidth, this.options.contentsHeight, “0″, “#000″);

    Under this i have typed:
    this.so.addVariable(‘autostart’,'true’);

    which fortunately has done the trick

    Good luck and hope this helps

    sugarflux



  14. Visit My Website

    September 15, 2008

    Permalink

    sugarflux said:

    Hi Guys

    Just a quick update to this..

    I don’t know if my comment above was useful to anyone – if so please let me know!!

    Since altering the above videobox.js i have also been on a mission to find out how to enable the Full Screen button. I’ve finally succeeded by adding the following line:

    this.so.addParam(“allowFullScreen”,”true”);

    Hope this is useful to someone!!

    sugarflux



  15. Visit My Website

    October 31, 2008

    Permalink

    bigmouth said:

    sugarflux,

    can you show me how to put self-hosted flv file in the link tag with vidbox as ref= link? I am rather confused.



  16. Visit My Website

    November 14, 2008

    Permalink

    ckiikc said:

    To autoplay with youtube you have to edit the videobox.js and add to the youtube url “&autoplay=1″ and after

    this.so.addParam(“wmode”, “transparent”);

    you have to add a line with:

    this.so.addParam(“autoplay”,”1″);

    it works for me (IE7, FF2)



  17. Visit My Website

    November 25, 2008

    Permalink

    dan said:

    after a bunch of messing around with code here, I got my fullscreen and autoplay working to my jw flv player displayed with videobox you need to find the following code in videobox.js:

    else if (sLinkHref.match(/\.flv/i)) {
    this.flash = true;
    this.so = new SWFObject(this.options.flvplayer+”?file=”+sLinkHref, “flvvideo”, this.options.contentsWidth, this.options.contentsHeight, “0″, “#000″);
    }

    and change it to:

    else if (sLinkHref.match(/\.flv/i)) {
    this.flash = true;
    this.so = new SWFObject(this.options.flvplayer+”?file=”+sLinkHref, “flvvideo”, this.options.contentsWidth, this.options.contentsHeight, “0″, “#000″);
    this.so.addVariable(‘autostart’,'true’);
    this.so.addParam(‘allowFullScreen’,'true’);
    }

    you can also add whatever usual variables and parameters you would under normal circumstances by adding them in a similar fashion.



  18. Visit My Website

    December 15, 2008

    Permalink

    the spiderweb marketing system said:

    I want to have a youtube video autoplay in the lightbox with an opt-in form below. hope it work for that



  19. Visit My Website

    December 24, 2008

    Permalink

    FullScreenProblem said:

    I have the same FullScreen problem with vidbox for youtube videos. I tried this.so.addParam(’”allowFullScreen”,true); – but it doesn’t work. I can’t see fullscreen button.



  20. Visit My Website

    January 7, 2009

    Permalink

    Shira said:

    I have problem using videobox my own hosted .flv files can anyone explain that issue to me? please



  21. Visit My Website

    March 21, 2009

    Permalink

    Richard said:

    Why does my flv file download when i input this code?
    this.so.addVariable(’autostart’,’true’);



  22. Visit My Website

    March 23, 2009

    Permalink

    matt said:

    Anyone know how to get it to play HD and HQ without clickign the HQ or HD button after it coems up? I tried &fmt18 and &fmt22 but that doesnt do the trick



  23. Visit My Website

    April 29, 2009

    Permalink

    degert said:

    to get your youtube video to autoplay just change into videobox.js :

    where:
    this.so = new SWFObject(“http://www.youtube.com/v/”+this.videoID

    add: +”&autoplay=1″

    and you can also add other youtube params



  24. Visit My Website

    May 15, 2009

    Permalink

    Johnny Five said:

    I am using a dojo.thumbnailpicker and the videobox. but my problem lays when i click on a thumbnail the vidbox just clicks straight through to youtube. and doesn’t display the popup windo with video. is there any way to rescan the page after my links change from clicking on the thumbnail.

    http://www.spot6management.com/talentspot/

    initial page load brings up video fine.

    but click on the thumbnails at the bottom and then the links go straight through to you tube.

    Note: i am just using some test videos right now. but will be using real videos of the actual talents later either locally hosted or youtube style.

    TIA.



  25. Visit My Website

    June 5, 2009

    Permalink

    Patrick said:

    Nice one there.

    Everything works for me, except I have an ajax window map that’s hidding the overlay and flash… anyone know how to make the flash at least go over the ajax window map?

    see here: http://loki.ouranos.ca/DAI/narr_step1_WM-e.html



  26. Visit My Website

    June 12, 2009

    Permalink

    Van-Awesome said:

    hi.

    I’m using the videobox wordpress plug-in, I can’t get my .flv to play, the vidbox opens but the file will not load, is there any trick to getting the .flv to work? (I am using a straight install of the plug-in, no added code).

    link to the plug-in: http://wordpress.org/extend/plugins/videobox/

    any help would be good Thanks :-)



  27. Visit My Website

    June 15, 2009

    Permalink

    Jeremy said:

    Hello,

    I’m having the same fullscreen and autoplay problems. None of the fixes posted have worked, but I should mention I’m a total novice with javascript. The videos I’m using with videobox are also hosted on vimeo.com, not youtube, if that makes any difference.

    Can someone please explain in greater detail how to get fullscreen and autoplay to work with vimeo.com videos in videobox?

    Thanks in advance,
    - Jeremy



  28. Visit My Website

    June 19, 2009

    Permalink

    kevin said:

    i had same problem with the auto play, solved it with this -

    this.so.addVariable(“autostart”,”true”);

    i used ” ratehr than ‘



  29. Visit My Website

    July 29, 2009

    Permalink

    SC said:

    autoplay and fullscreen:

    in videobox.js line 84 edit:

    “http://www.youtube.com/v/”+this.videoID+”&fs=1&autoplay=1″



  30. Visit My Website

    August 12, 2009

    Permalink

    gitar said:

    This above didnt work for me. I found another wa though:

    In videobox.js line 85 move “this.so.addParam(“wmode”, “transparent”);” down a line then add:

    this.so.addVariable(“autostart”, this.videoID+”&autoplay=1″);



  31. Visit My Website

    September 10, 2009

    Permalink

    Robey said:

    Thank you, it’s great and easy !
    I added this in videobox.js for wvx files :
    else if (sLinkHref.match(/\.wvx/i)) {
    this.flash = false;
    this.other = ”
    }



  32. Visit My Website

    October 20, 2009

    Permalink

    Bizzaro said:

    For some reason Videobox doesn’t display properly in IE for me. The top bit of the screen goes black but nothing else and the video is bigger than the container.

    I can’t find ANY info on this online. If anyone has a solution, lemme know. Thanx.



  33. Visit My Website

    October 27, 2009

    Permalink

    Ivan said:

    Hello! I’m using VideoBox with YouTube videos and everything works fine, except the overlay. Does someone know why the background overlay does not cover the whole screen?? When you scroll down or up the site, the overlay looks only in the middle and the rest of the screen is without overlay.
    Any help on this??

    Thanks in advance
    Ivan



  34. Visit My Website

    October 27, 2009

    Permalink

    maven said:

    wow!!! really a very precious information..thx guyz



  35. Visit My Website

    October 27, 2009

    Permalink

    Ivan said:

    Hello! Does anyone know how to fix
    the overlay that does not cover the whole screen (In both IE and Firefox)
    when you scroll down or up the page
    as the VideoBox is opened??

    Where I can set the overlay with and height?? Can I set it with percent instead of px?

    Thanks in advance, hope you can help me!

    Ivan



  36. Visit My Website

    November 22, 2009

    Permalink

    drenz0r said:

    For some reason Videobox doesn’t display properly in IE for me. The top bit of the screen goes black but nothing else and the video is bigger than the container.

    I can’t find ANY info on this online. If anyone has a solution, lemme know. Thanx.



  37. Visit My Website

    November 24, 2009

    Permalink

    Lu said:

    drenz0r: your videobox overlay is not covering the screen in IE because your page is in IE “Quirks” mode.

    The videobox.js makes calls to window.getHeight() and window.getScrollTop() which both return 0 when in quirks mode.

    The easiest way to resolve your problem is to include a doctype on your page.



  38. Visit My Website

    February 11, 2010

    Permalink

    Neil said:

    i am using vidbox to show swf files but I want to pass variables through a url query…i am a newb at js and I am not sure where to add the this.so.addVariable because I do not see an if”swf” case

    any help is appreciated..



  39. Visit My Website

    February 25, 2010

    Permalink

    kINGJESTEr said:

    I’ve been trying to figure out how to get the background overlay to fill the entire height of the entire page. If I scroll up or down I see that only the current content view is covered. Any suggestions?



  40. Visit My Website

    February 25, 2010

    Permalink

    kINGJESTEr said:

    I found a quick fix for the fullscreen overlay issue. In line 118 of the jqvideobox.js file I changed:

    overlay.css({‘top’: $(window).scrollTop()+’px’, ‘height’: $(window).height()+’px’});

    to this:

    overlay.css({‘top’: ‘0′, ‘height’: $(document).height()+’px’});

    - Specified top to be ‘0′

    - (document) will get the entire page height with scroll whereas (window) will get only the visible height.



  41. Visit My Website

    March 4, 2010

    Permalink

    Rick said:

    Just be careful when copying the FullScreen code from Dan’s (excellent) post on 25th Nov. The apostrophes are the evil curly ones and not the straight type.

    Use this instead:

    this.so.addParam(‘allowFullScreen’,'true’);



  42. Visit My Website

    April 23, 2010

    Permalink

    Jharna said:

    Hello! I’m using vidbox with YouTube videos and everything works fine,But it does not work with jquery script.If i use videobox on simple page it works.On my page i m using jquery and i want to use videobox to,but its not working.
    Any help on this??

    Thanks in advance
    Jharna



  43. Visit My Website

    May 18, 2010

    Permalink

    Eli said:

    this is an alternative to videbox and using the JQuery library http://plugins.jquery.com/project/jqVideoBox



  44. Visit My Website

    May 21, 2010

    Permalink

    Luetta Drucker said:

    Are you intrested in doing a guts post on my blog?



Leave a Comment

Here's your chance to speak.

  1. Name (required)

    Mail (required)

    Website

    Message

  • Most Popular Posts

    • { 108 } ResponsesPHP ajax login form using Jquery
    • { 79 } Responsesphp ajax tutorial create ajax based login form using jquery
    • { 71 } ResponsesASP Classic Programming Still Alive
    • { 53 } Responses63+ best practice to optimize PHP code performances
    • { 44 } ResponsesVideobox: Lightbox for videos
  • Latest Posts

    • PHP Newbie: Proper handling of Error & Exception in PHP
    • Why SEO lost importance
    • jQuery Mobile Announced : Touch-Optimized Web Framework for Smartphones & Tablets
    • Multiple Google Account Signin
    • Install, Configure & Running Memcache in Windows as Service
    • DynamicWP Image Cube Wordpress Plugin
    • New Wordpress 3.0 API menu_page_url
    • Wordpress 3.0 Custom Taxonomy
    • JQuery DataGrid Plugin Compass
    • Upgrading to upcoming CodeIgniter 2.0
  • Categories

    • advertorial
    • Ajax XMLHttpRequest
    • Featured
    • Freebies
    • Miscellaneous
    • Print & Web Design
    • Programming
    • Tutorials
    • Web 2.0
  • Featured News

    • PHP Newbie: Proper handling of Error & Exception in PHP by webmaster on August 18, 2010
    • Why SEO lost importance by webmaster on August 16, 2010
    • jQuery Mobile Announced : Touch-Optimized Web Framework for Smartphones & Tablets by webmaster on August 16, 2010
    • Install, Configure & Running Memcache in Windows as Service by webmaster on June 27, 2010
    • Website Optimization Best Practices, speed up your website load by ruby on May 21, 2009
  • Tag Cloud

    • Actionscript advertorial Ajax XMLHttpRequest API best practices CakePHP chat Classic ASP CMS CSS Development facebook firefox Flash flickr Freebies gmail HTML icons Javascript Jobs jQuery jQuery Plugins Library Lightbox memcache Mootools news Personal PHP PHP Frameworks plurk Print & Web Design prism Prototype regex regular expression Scriptaculous SEO Tutorial twitter Web 2.0 Wordpress Works YUI
  • Archives

    • August 2010
    • June 2010
    • May 2010
    • September 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009
    • December 2008
    • November 2008
    • October 2008
    • September 2008
    • August 2008
    • July 2008
    • June 2008
    • May 2008
    • April 2008
    • March 2008
    • February 2008
    • January 2008
    • December 2007
    • November 2007
    • October 2007
copyleft 2007 - 2010 Bali Website Design Studio