I'm using the official Vimeo Android Library.
Here's how I add it: compile 'com.vimeo.networking:vimeo-networking:1.1.1'
And here's how I use it:
// where mUri is in the following format: /videos/<videoId>
VimeoClient.getInstance().fetchNetworkContent(mUri, new ModelCallback<Video>(Video.class) {
@Override
public void success(Video video) {
if (!video.getStatus().equals(Video.Status.AVAILABLE)) {
// still processing
} else {
// code goes here because its status is already available
Log.e("main", "play: " + video.getPlay());
// this logs -- play: null
}
}
@Override
public void failure(VimeoError error) {
Log.e("main", error.getErrorMessage());
}
});
video.getDownload()
works and gives me an array of 3. I use the same access token that I used to upload the video. I also have a PRO account. I tried it in postman, using exactly the same access token and video ID and it works. The result contains a files section w/c looks something like this:
"files": [
{
"quality": "sd",
"type": "video/mp4",
"width": 480,
"height": 640,
"link": "<working string link here, I just replaced it for security>",
"created_time": "2017-10-26T06:58:09+00:00",
"fps": 23.980000000000000426325641456060111522674560546875,
"size": 867030,
"md5": "<md5 value here, I just replaced it for security>",
"link_secure": "<working string link here, I just replaced it for security>"
},
{
"quality": "sd",
...
},
{
"quality": "hls",
...
}
]
Those are 3 videos w/ working links. So I don't know why they're not being retrieved by the library :(
Please help, thanks!
video.getPlay()
is not available yet. – Draff