Forums / API
Using the WP Videobox plugin for Vimeo vids
Brad Dougherty Staff locked this topic on May 15, 2012 because old
Forums
Forum Rules
-
Be nice
Even if you disagree with someone, keep it civil.
-
Stay on topic
If it’s not relevant, leave it out or start a new thread.
-
Don't Spam
Re-re-re-re-posts drive us crazy.
-
Respect the Staff
We were members once, just like you.
Our Support Team
-
Sam
-
Mark
-
Ian
-
Tommy
-
Alex
We're here to help you 9AM-6PM EST, Monday to Friday.
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 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
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 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 Plus
Or if you're opening it via javascript:
Videobox.open("your video page url","your caption","vidbox widht height");
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
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 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 Plus
Hi again, I found the solution to my problem.
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 Plus
Ok ! In "videobox.js", just erase this line :
alert("Vimeo")
That's it !
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
AcroYoga Stockholm
Midiman and everybody else who figured this out - thank you very much for your input!
Howeer - i did the changes in the videbox.js, and still I cannot get it to work..
Could somebody give me feedback on what I am doing wrong?
Here´s the page.
tobiasstrollo.se/vimeo/
And here is my js:
tobiasstrollo.se/vimeo/js/videobox.js
Greatful for input!
cheers
/Tobias
dlyr
you don't have pasted code the right place in videobox.js
Charlesque
Thanks @midiman
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
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
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 Plus
@midiman!
Thank you for your solution! it works fine!
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.