Playing Vimeo content?

Has anybody figured out yet how to play videos hosted by Vimeo?


I am using a Vimeo Pro account which gives you access to the video URL.

When I feed the direct URL of a video file (e.g. https://player.vimeo.com/external/000000000.sd.mp4?s=xxxxxxxxxxxxxxxx&profile_id=yyy&download=1) to a MediaItem, I always get the message "An error occurred loading this content". Playing mp4 videos hosted somewhere else works right away.


I have no idea if the error is due to the URL format or the content of the video file... - any hints?


Rgds

Lutz

Are you using the "direct-download" links? (From the PRO faq...) Through direct video file links. PRO members can also grab non-expiring download links for each of their videos from the Video Files tab of each video’s Settings. In the “Access your video files” section, choose “Download your video” and grab any of the URLs provided. If you create a hyperlink using one of these URLs, most major browsers will then download the file onto your viewer’s computers

Yes, I've tried all varieties of the direct video links they offer, but to no avail so far...

Accepted Answer

You can get any of the direct-download links and make sure there are no more than one query strings attached at the end. The following example works.


https://player.vimeo.com/external/141945741.hd.mp4?s=dd087c887927f9e360c550a6e4b66f0c


I pass this url to the Presenter using attributes and it ends up into this piece of code. It works.


launchPlayer: function(videoURL) {

var player = new Player();

var playlist = new Playlist();

var mediaItem = new MediaItem("video", videoURL);

player.playlist = playlist;

player.playlist.push(mediaItem);

player.present();

},

Hi there,

we tested a solution like this:


var Presenter = {
    makeDocument: function(resource) {
        if (!Presenter.parser) {
            Presenter.parser = new DOMParser();
        }
        var doc = Presenter.parser.parseFromString(resource, "application/xml");
        return doc;
    },

    modalDialogPresenter: function(xml) {
        navigationDocument.presentModal(xml);
    },

    pushDocument: function(xml) {
        navigationDocument.pushDocument(xml);
    },

    load: function(event) {
      var self = this,
          ele = event.target,
          videoURL = ele.getAttribute("videoURL")
      if(videoURL) {
        var player = new Player();
        var playlist = new Playlist();
        var mediaItem = new MediaItem("video", videoURL);
        player.playlist = playlist;
        player.playlist.push(mediaItem);
        player.present();
      }
    },
}


It works with hosted MP4, but the Vimeo links like the one suggested here still don't work. We tested it with: https://player.vimeo.com/external/135947533.hd.mp4?s=b618515571a15647844795af6f3eabfc


Even if we load the launchPlayer: function(videoURL) code after load: function(event) or inside it, it doesn't work. In what are we wrong, for you?


Thanks in advance,
M.

Problem solved: without eliminating the second query string, as per XML syntax, we converted "&" to the relative entity "&", it works. 🙂

Playing Vimeo content?
 
 
Q