Getting Vimeo To Play Inside JWPLAYER

This thread may refer to an older version of JW Player! Check our articles for the most up-to-date information.
This Q&A thread was imported from our previous system and could apply to an older product.
  • Can you post on how to do this.. maybe lefty can help here like on the Dailymotion..

    i am trying to learn and figure this out.. yeah you can webscrape the link from the or even with clipnabber.. but the link will download but does not play directly in jwplayer..

    like with google someone posted the example page that needs to be loaded.. Can someone explain exactly what this page does??

    bc.. <?php

    // Google URI:
    // MP4:
    // call with:
    // JWMP code:
    // 'file': encodeURIComponent('Google_URI.php?docid=7206494026138253535'),
    // 'type': 'video',
    // FLV:
    // call with:
    // JWMP code:
    // 'file': encodeURIComponent('Google_URI.php?docid=7206494026138253535&type=flv'),
    // 'type': 'video',

    $docid = (isset($_GET['docid'])) ? strval($_GET['docid']) : '7206494026138253535';
    $type = (isset($_GET['type'])) ? strval($_GET['type']) : 'flv';

    $file = @file_get_contents("$docid");

    if($type == 'flv')
    preg_match("/googleplayer.swf\?videoUrl\\\\x3d(.*?)\\\\x26/", $file, $match);
    preg_match('/right-click <a href="(.*?)">this link/', $file, $match);

    $uri = urldecode($match[1]);

    header("Location: $uri");


    so if i scrape with the link from then would i use something similar like above to get the the .flv to play in the jwplayer??

    see is you paste this in your browser it returns you the Download Link which works if you click on it downloads the .flv

    but if you paste the same link in the JWPLAYER..

    just need an explanation why it does not work and what needs to be done to circumvent it.. from what i found i think it needs to do something similar to the google_uri.php page above...

    lefty any help here. or anyone with knowledge..or point me in the direction where i can read any info on net to figure this out..


  • First of all, it's just magic.

    The Google Video script is scraping for the URI of the video file right here:bc.. if($type == 'flv')
    preg_match("/googleplayer.swf\?videoUrl\\\\x3d(.*?)\\\\x26/", $file, $match);
    preg_match('/right-click <a href="(.*?)">this link/', $file, $match);

    That's it, that's all it does.

    The KEEPVID URI that you posted above ( ** ) returns a page that you can scrape just like you scraped Dailymotion.

    The URI looks like this:bc..
    so use the *type=video* flashvar to tell the player it is a video.

    Up Down 1 rated
  • hello lefTy

    hmm your are right BUT

    the link is not on this page :-/
    can not find any link like this

    any idea how i can geht this values ?

    best regards

    Up Down 0 rated
  • I wrote a plugin to play vimeo videos in the jw player.
    example here:

    It's also perfectly legit with the terms of Vimeo because the video is loaded through the moogaloop player.

    If you are interested, contact me: info [at] wessite [dot] com


    Up Down 0 rated
  • preaty nice wessite. the two video you have on that exampla plage are they just embed using your plugin or can they be added to a playlist mixed with like youtube videos as well? Oh and the last video its and HD right?

    Up Down 0 rated
  • hey water, yep the videos are embedded in the jw player, for now it's not possible to add them in a playlist but I think it can be done.

    both are in normal quality, of what I read on the Vimeo forums, only the videos of people with a plus account can be embedded in HD. you can of course try to retrieve the HD flv file directly but that would be against the terms of Vimeo...


    Up Down 0 rated
  • Looks very good could this also be incorporated into files?

    Up Down 0 rated
  • I don't think so, doesn't have an API

    Up Down 0 rated
  • the plugin is updated and now supports playlists,

    also an loading indicator is added and several bug fixes.


    Up Down 0 rated
  • It really isn't very hard to figure out the url to the source video (usually MP4) of vimeo videos - I worked on this last night, as part of a client website video page:

    The videos are automatically loaded from his vimeo account,

    I used the RSS feed feature of vimeo to get the video IDs of his videos (and other info such as title).
    I then wrote a small function to convert a vimeo ID into a source video (mp4) URL:

    bc.. function vimeoid2url($id) {
    $xmlurl = "{$id}";
    $videoxml = file_get_contents($xmlurl);


    $url = "{$id}/{$sig[1]}/{$sigexp[1]}/?q=sd";
    return $url;

    Then I simply load that URL in the JW FLV player like any other video URL.
    (although you do need the "type=video" FlashVar so the player knows it is a video)

    If you understand the above code, great, I hope it helps you. If not, and you would like help with getting something similar working for yourself, I can be contacted at

    Good luck =)

    Up Down 0 rated
  • Works quite well!


    Up Down 0 rated
  • andrew - im not a php developer but am trying to learn quick so i can get your function to work

    wessite - i would love trhe plugin but how do i get it ?

    Up Down 0 rated
  • thanks for the example.. as i need to do with many different servers

    Up Down 0 rated
  • checked out as are you using Just Firebug to get the GET request... and then Trial and Error to your get the correct equation.

    i understand your example as i just typed in the to variables. so did one of my videos then i get the xml

    I just manually took the the two variables


    and manually entered them into the address bar

    and it worked.. as i looked at their API as some providers provided the direct link

    other do not provide as i do not see in their API on Vimeo but you gave me the docs. :)

    Up Down 0 rated
  • @frustrated: If you like, I can help you get started, or write a PHP page to do the trick for you. Feel free to email me, or whatever.
    You can email wessite at info[at]wessite[dot]com for the JW plugin, but he is charging for it, not sure how much.

    @lost: glad I could help =)

    @Subfighter: I hope it is all working great for you now, if so, glad I could help =)

    Up Down 0 rated
  • I made have been using a script to auto extract the url from the way Subfighter suggests and most of the time it works. But there is a serious fault with it that means sometimes my videos just won't load :P

    It is probably happening to all of you you just haven't been around the times it doesn't work.

    I think i found something about it here (it's a bit old though)...

    Up Down 0 rated
  • I have upgraded the Vimeo Plugin to work with the newest Moogaloop API of Vimeo.

    Check it out here:

    Up Down 0 rated
  • I want to embed the player on my website in such a way that it can play videos from other sites , it uses the link of website like or or etc.. and play it on my site . how can i do that can anyone help me please.... I will be very thankful ....

    Up Down 0 rated
  • @Everyone who has this issue in java/jsp

    I used the code from "Andrew Beveridge" and translated for my needs (for that: Thanks @ Andrew)
    In java I used saxbuilder to browse the xml. Underneath the (for me working) result...
    bc.. private boolean elementNotNullOrEmpty(Element el) {
    return el != null && el.getText() != null && el.getText().trim().length() > 0;

    public String VimeoId2Url(String id) {
    String url = null;
    URL xmlurl = new URL(""+id);
    InputStream is = xmlurl.openStream();

    SAXBuilder builder = new SAXBuilder();
    builder.setFactory(new DefaultJDOMFactory());
    Element root =;

    String sig = null;
    Element sigEl = root.getChild("request_signature");
    if (elementNotNullOrEmpty(sigEl)) {
    sig = sigEl.getText();

    String sigExp = null;
    Element sigExpEl = root.getChild("request_signature_expires");
    if (elementNotNullOrEmpty(sigExpEl)) {
    sigExp = sigExpEl.getText();

    url = ""+id+"/"+sig+"/"+sigExp+"/?q=sd";
    }catch(Exception e){}
    return url;

    Up Down 0 rated
  • Can anyone tell/explain if I can use the wessite vimeo plugin without swfobject.js

    Currently, I have something like this:
    bc.. <object width="400" height="320">
    <param name="FlashVars" value="video=" />
    <param name="allowfullscreen" value="true" />
    <param name="allowscriptaccess" value="always" />
    <param name="movie" value="../include/player.swf" />
    <embed src="..include/player.swf" FlashVars="video=" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="320"></embed>

    Up Down 0 rated
  • It should work with any method of embedding.

    Up Down 0 rated
  • Hey Wessite,

    very nice example! Could you tell me how you hid the controls of the vimeo player?
    I'd like to do the same thing with my player:


    Up Down 0 rated
  • is nor working more for me :(

    Up Down 0 rated
  • @igor – do you have a link?

    Up Down 0 rated
  • I need vimeo plugin to download the flv file without need to play it just click the link and download begin is that possible ?

    Up Down 0 rated
  • @Nasom – Check out –

    Up Down 0 rated
  • i need to play following video
    using jw player in in php drupal website plz provide me the code to doing this.

    siddhartha saini

    Up Down 0 rated
  • We don’t support Vimeo officially, check out the link above.

    Up Down 0 rated

This QA is closed.

Still don't have JW Player? Get It Here