5
votes

I am using this library https://github.com/youtube/youtube-ios-player-helper in my project. The player works well if I use the video Id given by the sample (M7lc1UVf-VE). If I use the video Id from r random video on youtube it shows:

An error occurred, please try again later. Learn More

Do I need to enable a youtube data API or something like that??? cause I see another IOS Youtube helper needs to do so. https://github.com/youtube/yt-direct-lite-iOS

Thanks.

2

2 Answers

1
votes

add this in your playerVars @"origin" :@"http://www.youtube.com" it will work.

0
votes

If you only want to play youtube video, no API access is needed.

I work on with this library without any error, did you replace "M7lc1UVf-VE" with the correct video id?