The following two conditions must be met to gain access to the .mp4
video files.
- You uploaded the videos (so you own them)
- You are a PRO Vimeo user.
I haven't worked with Phonegap before but I have some perspective on Android. The easiest way to get the URL via Android code is through the the Vimeo API. There is a Java library for interacting with the Vimeo API here which will allow you to request Video
objects for the videos you own (probably by hitting the /me
endpoint).
This section of the README.md should be helpful in understanding how to get access to fields on the Video
object (but you should read the whole thing to get it set up).
Once you have a Video
object, you can access the download
field which is an array of VideoFiles
which will contain a link to an .mp4
file that you can pass to any file downloader. The code would look something like below:
Video myVideo = ...// Some video retrieved from the API
if(mVideo == null || mVideo.download == null || mVideo.download.isEmpty()) {
// Throw an error
}
VideoFile videoFileToDownload = mVideo.get(0);
// The url to the mp4 file
String videoFileUrl = videoFileToDownload.mLink;
download(videoFileUrl); // You'll need to make a method to download
The two holes are 1) how to get a video and 2) how to download a file. The first question can be answered by the vimeo-networking-java library's README. The second question should be easy enough to find a solution on Google (downloading a file given a link to an .mp4 file).