How to play youtube/vimeo video within the application in iPhone

前端 未结 9 2243
[愿得一人]
[愿得一人] 2020-12-23 02:42

I am building an application where I want to play video from url like Youtube, Vimeo, Direct url. I am making custom player using AVPlayer to play a video from a direct url

9条回答
  •  星月不相逢
    2020-12-23 03:05

    I used the following method to solve the same problem successfully.

    Use youtube-ios-player-helper and add the code:

    [_playerView loadWithVideoId:@"DmTzboEqfNk" playerVars:@{
                                                             @"playsinline" : @1
                                                             }];
    

    You can find more vars in Youtube > IFrame API.

提交回复
热议问题