Scraster.com

Scraster.com

Videobox [videobox-lb.sourceforge.net/] is one of several video lightbox tools that I've been experimenting with recently. Since I work in WP, I've installed the Videobox plugin (which works better than the others I've tried), which plays a few major video formats: YouTube, Google, MetaCafe, and the JW player. Since I use Vimeo primarily, I'd like to add some code to the Videobox javaScript file to be able to play Vimeo vids. I'm a novice at this kind of coding, so I'm hoping there is someone that might be able to translate the following Videobox code for playing Google vids into a chunk of code that I can include for playing Vimeo videos. I'm hoping that this is all it will take, but if anyone has any ideas as to what might be additionally necessary, please let me know. Thanks very much.

else if (sLinkHref.match(/google\.com\/videoplay/i)) {
this.flash = true;
var hRef = sLinkHref;
var videoId = hRef.split('=');
this.videoID = videoId[1];
this.so = new SWFObject("video.google.com/googleplayer.swf?docId="+this.videoID+"&hl=en";, "flvvideo", this.options.contentsWidth, this.options.contentsHeight, "0");
this.so.addParam("wmode", "transparent");
}

Casey Pugh

Casey Pugh Plus

Try this:

else if (sLinkHref.match(/vimeo\.com/i)) {
this.flash = true;
var hRef = sLinkHref;
var videoId = hRef.split('/');
this.videoID = videoId[3];
this.so = new SWFObject("vimeo.com/moogaloop.swf?clip_id="+this.videoID, "flvvideo", this.options.contentsWidth, this.options.contentsHeight, "0");
this.so.addParam("wmode", "transparent");
}

Scraster.com

Scraster.com

Thanks, Casey! This code worked for me. Getting closer. The one final step is getting the lightbox to resize to my desired dimensions (720px x 405px). Would that be added into your code above, or into the JS script? I've tried messing with the JS to no avail. Thanks again.

Casey Pugh

Casey Pugh Plus

According to Videobox:

You can change the dimensions of the video by adding rel="vidbox width height".

So, I guess you'd end up with:

<a href="vimeo.com/135113"; rel="vidbox 720 405" title="caption">our video1</a>

Casey Pugh

Casey Pugh Plus

Or if you're opening it via javascript:

Videobox.open("your video page url","your caption","vidbox widht height");

Clément Lelong

Clément Lelong

I copy-pasted Casey's code but it still does not show nothing on my website (though the other videos on Youtube would play.

Can anyone please help me ?

THANK YOU !

midiman

midiman

I got this to work, however Vimeo's nice way of removing the protocol strings from the URL's is confusing to people wanting to copy/paste code.

So try the code here added to the videobox.js conditional branch if-else chain as shown:

pastebin.com/f2dd33db3

Consequently your HTML code would look like so:

pastebin.com/f644e6db4

Romain

Romain Plus

Hi,

It works for me but just before the box is opening, a window pops up with just "vimeo" ! How can i please get rid of it ??
THANKS

Romain

Romain Plus

Hi again, I found the solution to my problem.

Luchiano Prata

Luchiano Prata

Can tell me the solution? I am experiencing the same problem, but I am a novice at programming, I could not fix it!

Thanks!!

Romain

Romain Plus

Ok ! In "videobox.js", just erase this line :

alert("Vimeo")

That's it !

Lame Skits

Lame Skits

I need help. I'm of course a novice. Here is my original code. How do I edit this so that my vimeo video will play inside the videobox correctly????
This blog keeps deleting my code

My test

dlyr

dlyr

you don't have pasted code the right place in videobox.js

Joris van der Mark

Joris van der Mark

is it possible to add autoplay and remove the title of the video in he video before it starts? Like you can do when you embed the video.

Sonia Ortiz

Sonia Ortiz

Hello,
I am developing a site for a friend and the videobox is not showing for me :-( I have read through the chain and have tried updating my videobox js and html but my links just continue linking to the vimeo page. any help is appreciated!

Thank you!

Leo Pat

Leo Pat

Anyone still replying on this?
My box just pops open, it enlarges in vertical position, does not change in horizontal, and stays blank.

Help would be very appreciated.

Thanks in advance.

Black Dog

Black Dog Plus

@midiman!
Thank you for your solution! it works fine!

Baby Ghost Media

Baby Ghost Media Plus

Thank you so much everyone for all your input! I've been pulling out my hair all day trying to figure out a way to get the wonderful videobox to play vimeo.

This conversation is missing your voice. Please join Vimeo or log in.

Forums

Forum Rules

  1. Be nice

    Even if you disagree with someone, keep it civil.

  2. Stay on topic

    If it’s not relevant, leave it out or start a new thread.

  3. Don't Spam

    Re-re-re-re-posts drive us crazy.

  4. Respect the Staff

    We were members once, just like you.

+ Learn more

Our Support Team

  • Sam Morrill Sam
  • Mark Cersosimo Mark
  • Ian Durkin Ian
  • Tommy Penner Tommy
  • Alex Dao Alex

We're here to help you 9AM-6PM EST, Monday to Friday.

Keyboard Shortcuts

Just think about it… What if you were trapped under something heavy and the mouse was out of your reach? Scary, right? That's exactly why we have these keyboard shortcuts so you can still use Vimeo until the help arrives.

  • [ Prev video
  • ] Next video
  • L Like this video
  • S Share this video
  • F Full screen
  • V Couch Mode
  • M More videos
  • ? More shortcuts