Android app - private viemo videos not playing
Asked Answered
H

4

2

I'm currently developing an android mobile app. I see that private Vimeo videos are not playing. Check the attached screen shot. Also note that the android app is still on development mode and not uploaded to Google. Please help me in this regard.

Regards, Niladri!

private vimeo video not playing

Halfpenny answered 7/4, 2015 at 9:55 Comment(1)
i was not able to playthe video using my native videoview i had to do it using webview.Balancer
A
4

That picture appears to be accessing vimeo.com directly to view videos. At vimeo.com, private videos can only be viewed if you are logged in (which is unrelated to the API).

If you want to play a private video in your application you will need to follow one of the following workflows:

  1. Embedded in a webview

    • Mark your video as hidden from vimeo, yet embeddable, in your video's settings
    • Make an API request to /videos/{video_id} and extract the embed code from the response body (response.embed.html)
    • Put the embed code in your webview's html
  2. Played in the Native Player (Vimeo PRO only)

    • Mark your video with any privacy setting
    • Make an API request to /videos/{video_id}
    • Find the collection of video files (response.files)
    • Loop through the video files to find the best height and width for your target player
    • Load the link into your native player

You can read more about the Vimeo API at https://developer.vimeo.com/api, and https://developer.vimeo.com/api/endpoints

After answered 7/4, 2015 at 18:34 Comment(1)
there is any library for play directly vimeo video through video id any player or sdk or anything else for android?Tottering
D
0

If you want to play private Vimeo videos of your Vimeo account in an Android Application then follow the steps below:

  1. Go to your video privacy settings and mark it as hidden from Vimeo and embed anywhere.
  2. Make an API request to this endpoint: https://api.vimeo.com/users/{your_user_id}/videos
  3. Get the embed.html string from the API response.
  4. Load embed.html obtained in the previous step into your WebView.

For Vimeo Android SDK: https://github.com/vimeo/vimeo-networking-java

Dominations answered 23/10, 2017 at 5:32 Comment(0)
P
0

You can retrieve the Video endpoint by calling an auth-enabled REST API and then play it using a player(I used Exoplayer in android). Follow below steps:

  1. API Registration: You will need an application registered with the Vimeo API. If you do not already have an application registered, you can do so here. You can generate an access token in the Authentication tab once you select your app from the list here. enter image description here enter image description here With this access token you'll be able to make any requests that the access token's scope allows. You will NOT be able to switch accounts if you only supply the access token.

  2. Call rest API with the access token in the header like below

Endpoint:

https://api.vimeo.com/videos/{VIDEO_ID}

Header:

Authorization:bearer ACCESS_TOKEN
  • VIDEO_ID is the id of video uploaded to Vimeo(Some number eg: 45334535)
  • ACCESS_TOKEN is the token you got after API Registration

This steps worked for me. I hope this will help someone.

Projector answered 7/10, 2022 at 10:17 Comment(0)
I
-1

We have a special google's SDK for YouTube for instance. On the other side AOS does not support Adobe Flash. Maybe its just has an unsupported by AOS video codec used by vimeo service? That could be the reason why you cant watch vimeo videos via WebView/browser.
Did you check for Vimeo official Android SDK if such thing does exist at least?
Also check this
And a little suggest: try to use SO search and google - it helps in most cases :)

Inconsecutive answered 7/4, 2015 at 10:12 Comment(2)
Can you @Inconsecutive please provide me the link of Vimeo official Android SDK?Halfpenny
there is no sdk it's just rest api callsBalancer

© 2022 - 2024 — McMap. All rights reserved.