Search code examples
androidvideoandroid-videoviewvimeovimeo-api

Direct link of vimeo android


I have a video view which is able to stream video, plus I have pro account. where I can upload trailers (movies). I need anyone to help,how can I get direct link of video which is possible to load in video view. I have explored some method like to load video in webview which I really don't want. so help me out in loading it in videoview.

link which I want to stream in native video view

Link


Solution

  • If you want to get a direct link of vimeo video, which you can pass to any player. Here's the method: first hit on to this link https://player.vimeo.com/video/[VIDEO_ID]/config you get a json responce.you can parse json this way

    String URL = json.getJSONObject("request")
        .getJSONObject("files")
        .getJSONObject("h264")
        .getJSONObject("sd").getString("url");
    

    Now the output string "URL" can be used in any player. which is actually a direct link to stream video.