I am trying to use a YTPlayerView in my app and I'm running into problems with loading in the video. I have checked the videoId that it is using and when I paste it into safari (www.youtube.com/watch?v=videoId) I arrive at the correct video on YouTube. However, when I load the video into the YTPlayerView with the loadWithVideoId: method the webview of the player view is empty.
Asked
Active
Viewed 1,054 times
1 Answers
2
Some videos on YouTube Mobile are protected from copyright holders.
I don't know the reason why we can't play them on mobile.
Test your video ID on your phone instead of your desktop.
If you can't play it on your phone, the video is protected one.
I recommend XCDYouTubeKit framework.
It will help your problem.

OJ Shin
- 36
- 5
-
Thanks for suggesting the other framework. I am currently trying it out and it seems great except that some of the videos I link to will be longer than 10 minutes, and it is not clear about how to deal with that. Can you help me with that? – jeremyabannister Nov 05 '14 at 20:42
-
If copyright holders protect their videos, whether it is longer than 10 minutes or not, you can't play it on mobile. However, you can play any videos using XCDYouTubeKit. (Choose developer branch in its page.) Unfortunately, there is a problem in this framework. Sometimes, the real data addresses of the protected videos are changed. In this case, you have to wait until the framework is updated. I hope this will help you. Cheers~ – OJ Shin Nov 06 '14 at 07:04