Getting null from video.getPlay()
See original GitHub issueI successfully get a Video instance from fetchNetworkContent
but then I get null when invoking video.getPlay()
.
String accessToken = getString(R.string.vimeo_access_token);
Configuration.Builder configBuilder = new Configuration.Builder(accessToken);
VimeoClient.initialize(configBuilder.build());
VimeoClient.getInstance().fetchNetworkContent(uri, new ModelCallback<Video>(Video.class) {
@Override
public void success(Video video) {
// I successfully get here , but play is null.
Play play = video.getPlay();
if (play != null) {
VideoFile hlsFile = play.getHlsVideoFile();
String hlsLink = hlsFile.getLink();
initializePlayer(Uri.parse(hlsLink));
}
}
@Override
public void failure(VimeoError error) {
...
}
});
I am using a token which I created from My Apps with my Vimeo Account.
I am expecting to get some result from play
so I can get the hls link of the video.
I am following all the requesites the documentation ask to get video files.
- User must be logged in. (I am using a valid token which I create in my app)
- User must be the owner of the video. (I am the owner of the video I am asking for)
- User must be PRO or higher (or the app must have the “can access owner’s video files” capability). (My account is PRO, I can even get this link from vimeo playground)
- Token must have the video_files scope. (My token has the video_files scope, actually I tried with all the scopes on but did not work)
- User must be the owner of the API app making the request. (The app is mine that I created using the same account)
Trying for two days, how to solve this issue?
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Vimeo API Video.getPlay always returns null - Stack Overflow
video.getDownload() works and gives me an array of 3. I use the same access token that I used to upload the video. I...
Read more >getPixels() returning null using ofVideoPlayer - beginners ...
I'm having incredibly painful problems loading frames of a video into a vector called eventFrames. I have pasted the whole function below, and...
Read more >VideoPlayer GetTexture returns null - Community | MonoGame
I'm just trying to play an mp4 video in my game, but GetTexture always returns null no matter what. Surely mp4 is supported?...
Read more >Video.js Setup
If there is no player matching the argument, it will attempt to create one. Using videojs.getPlayer(). Sometimes, you want to get a reference...
Read more >Player Catalog - Brightcove Player Documentation
The catalog's library makes it easy to get information on Video Cloud media and load them into ... If no error occurs, this...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Thank you for your attention. Actually, I am getting hls link like this.
I tried it in more than 30 videos already and it is working. I am still not 100% sure but I think Hsl link is always the last in the array and there is always a hls link.
Yes, video.files will only be removed in a future update. I recommend fixing the API version to the current version (3.4 I think?) just so that the app doesn’t suddenly break.
There is a way to get the hls link, but I don’t remember how I did it. You’d have to look into the library source code to find that.