Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Youtube ios player helper can't play video

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.

like image 748
Siu Chung Chan Avatar asked Nov 10 '22 19:11

Siu Chung Chan


1 Answers

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

like image 157
Pratik Jamariya Avatar answered Nov 14 '22 22:11

Pratik Jamariya