2

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,

  1. 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?
  2. 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..!!

Nafiul Alam Fuji
  • 407
  • 7
  • 17
  • Hello @Nafiul, Did you find an answer ? – Vikas Choudhary Jan 24 '22 at 09:17
  • as far as I remember this problem was solved. please check out my other question-answer here https://stackoverflow.com/questions/65578764/how-to-integrate-vimeo-on-android-and-website-with-specific-user-access and let me know whether it solves the problem or not, then I will add it as the answer. – Nafiul Alam Fuji Jan 25 '22 at 02:09

0 Answers0