vimeo / PlayerKit

MIT License
154 stars 54 forks source link

Error playing Vimeo videos #54

Closed yargeel closed 5 years ago

yargeel commented 5 years ago

Hello! I'm developing an app with Vimeo Pro videos. Backend gives urls like this: "https://vimeo.com/283472685/e184291bed", but PlayerKit reports error "PlayerKit_Example[1709:19210] 🚫 Optional(Error Domain=NSOSStatusErrorDomain Code=-12660 "(null)")". Is there "getting started" for newbies (looking for it on developer.vimeo.com, but have no success)? Thank you in advance!

suneelseelam commented 5 years ago

Hi Team,

           We are trying to play Vimeo videos demo url like : "https://player.vimeo.com/video/9011932" with the help of playerkit , we are not able to play , and I tried this "https://github.com/vimeo/PlayerKit/blob/master/Example/PlayerKit/video.mp4?raw=true"  it has been played . we has to add any extension to the video url?, I haven't get any "playerstatus" too. Please help us out.

Thanks In advance!

nicolelehrer commented 5 years ago

Hi @yargeel, the URL you provided is for videos with a special privacy (they're only visible to those who have the link). You shouldn't have trouble fetching the playable files for these links but the request requires some special formatting in order to get the playable files. First off

nicolelehrer commented 5 years ago

@suneelseelam the last point in my previous comment might answer your question as well - that video is playing because the URL https://github.com/vimeo/PlayerKit/blob/master/Example/PlayerKit/video.mp4?raw=true points to the file itself. In order to get the equivalent files for Vimeo videos, you'll need to interact with the Vimeo API. When you can, let us know your account type and the video files you'd like to access (for more info, check out the first 2 bullets listed above). Thanks!

ergunkocak commented 5 years ago

@suneelseelam

For non private videos do we still to use api? For example can i use this url: https://player.vimeo.com/video/304846250

Best

nicolelehrer commented 5 years ago

@ergunkocak That's right, you'd still need to use the Vimeo API to get a playback URL for PlayerKit.

Cristy4 commented 5 years ago

Hi,I think I have the same problem, can you post an example for set Vimeo API to get an url with access token?