MPMoviePlayerController error _itemFailedToPlayToEnd while playing youtube video iOS 7

前端 未结 3 983
囚心锁ツ
囚心锁ツ 2021-01-02 01:55

I\'ve seen this mentioned a few places around the web but have yet to find answer anywhere.

I am using ALMovieplayercontroller library. Everything works fine but whe

3条回答
  •  南笙
    南笙 (楼主)
    2021-01-02 02:22

    Yes after so much researching i found to the following soluction.

    MPMoviePlayerController directly will not play the youtube videos. you have to extract the video URL and set video URL to MPMoviePlayerController. after this video will be played.

    There are lots of API available that gives the extracted video URL.

    Some of them are below

    XCDYouTubeKit

    HCYoutubeParser

    But using this API your application might be rejected. you should have to use on your risk.

    Best way to play youtube videos is the WebView.

提交回复
热议问题