Android app - private viemo videos not playing

纵然是瞬间 提交于 2019-12-08 11:20:28

问题


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:

  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




回答2:


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




回答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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!