0
votes

I'm developing my youtube app on iOS and using AVPlayer to play video. But I don't know why my player can't play the Vevo video. Any idea for my problem? Thanks a lot.

1

1 Answers

0
votes

You should use the iOS Youtube Helper library for playing youtube videos.

https://developers.google.com/youtube/v3/guides/ios_youtube_helper

I don't know if you can use the AVPlayer. I've seen some examples using MPMoviePlayerController on CocoaControls, like this one: https://www.cocoacontrols.com/controls/hcyoutubeparser or this one: https://www.cocoacontrols.com/controls/xcdyoutubevideoplayerviewcontroller

But I don't think using youtube's url directly in your player fits the ToS of the platform. So I will recommend you tu use the Youtube Helper Library if you are planning to publish your app.