I followed https://github.com/vimeo/vimeo-networking-java to configure Vimeo client(initialized by that accesstoken) on Android using hardcoded access token (has access to public and private videos). but the call of VimeoClient.getInstance().fetchContent() fails.
public void vimeoSettings(){
String urlPublic = "https://player.vimeo.com/video/496738949";
String urlPrivate = "https://player.vimeo.com/video/496739025";
Configuration.Builder confBuilder = new Configuration.Builder("ACCESS_TOKEN");
//later will generate in runtime and whats the validity?
Configuration configuration = confBuilder.build();
VimeoClient.initialize(configuration);
VimeoClient.getInstance().fetchContent(String.valueOf(Uri.parse(urlPublic)), CacheControl.FORCE_NETWORK, new ModelCallback<Video>(Video.class){
@Override
public void success(Video video) {
if(video != null){
Log.d("webviewactivity","inside vimeo settings - video not null ");
Play play = video.getPlay();
if (play != null) {
VideoFile dashFile = play.getDashVideoFile();
String dashLink = dashFile.getLink();
// load link
VideoFile hlsFile = play.getHlsVideoFile();
String hlsLink = hlsFile.getLink();
// load link
ArrayList<VideoFile> progressiveFiles = play.getProgressiveVideoFiles();
String linkToMp4File = progressiveFiles.get(0).getLink();
webView.load(linkToMp4File);
}
}
}
@Override
public void failure(VimeoError error) {
Toast.makeText(getApplicationContext(), error.getMessage(), Toast.LENGTH_SHORT).show();
}
});
}
facing these Errors :
E/cr_VariationsUtils: Failed reading seed file "/data/user/0/com.emergingit.emergingstudy/app_webview/variations_seed": /data/user/0/com.emergingit.emergingstudy/app_webview/variations_seed (No such file or directory)
E/chromium: [ERROR:gl_surface_egl.cc(335)] eglChooseConfig failed with error EGL_SUCCESS
what are these errors indicate and, even if I solve this,
- is this the right approach to load in Webview as I must have to make my video private with domain restriction for the website use case?
- can I use this approach to play in https://github.com/ct7ct7ct7/Android-VimeoPlayer?
I am getting verified first by our token from the backend and then given the URL. after that using the access token and configuring the Vimeo client I need to load the video. Vimeo official documentation for this kind of private video scenario for android seems really unclear to me and also contacted for help but did not get any response though I have a paid account.
Please help or suggest..!!