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
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.