问题
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
回答1:
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:
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
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
回答2:
If you want to play private Vimeo videos of your Vimeo account in an Android Application then follow the steps below:
- Go to your video privacy settings and mark it as hidden from Vimeo and embed anywhere.
- Make an API request to this endpoint: https://api.vimeo.com/users/{your_user_id}/videos
- Get the embed.html string from the API response.
- Load embed.html obtained in the previous step into your WebView.
For Vimeo Android SDK: https://github.com/vimeo/vimeo-networking-java
回答3:
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 :)
来源:https://stackoverflow.com/questions/29488750/android-app-private-viemo-videos-not-playing