I need to play Vimeo viodes in my app having only video id. For example 83342420. How can I get vimeo video url? Or is there any other way to play video in android?
Going off of what Andrew F had commented, I wrote this simple Javascript to handle this process:
function loadVimeoVideo(id) {
'use strict';
var req, json, url;
if (window.XMLHttpRequest) { // code for IE7+, Firefox, Chrome, Opera, Safari
req = new XMLHttpRequest();
} else { // code for IE6, IE5
req = new ActiveXObject("Microsoft.XMLHTTP");
}
req.onreadystatechange = function () {
if (req.readyState === 4 && req.status === 200) {
json = JSON.parse(req.responseText);
url = json.request.files.h264.sd.url;
document.getElementById(id).getElementsByTagName("source")[0].setAttribute("src",url);
}
};
req.open("GET", ("https://player.vimeo.com/video/").concat(id, "/config"), true);
req.send();
}
The setup in Html looks like this:
Edit: I'm just going to say it, remember to replace YOURVIMEOIDHERE with your Vimeo video's id.