I am using code:
moviePlayer = new MPMoviePlayerController(new NSUrl("https://www.youtube.com/watch?v=9SdF_1OrN0Y"));
moviePlayer.View.Frame = new RectangleF(10, 80, 300, 200);
moviePlayer.View.BackgroundColor = UIColor.Clear;
moviePlayer.SourceType = MPMovieSourceType.File;
//moviePlayer.SetFullscreen(true,true);
moviePlayer.Fullscreen = true;
// Set this property True if you want the video to be auto played on page load
moviePlayer.ShouldAutoplay = true;
// If you want to keep the Video player on-ready-to-play state, then enable this
// This will keep the video content loaded from the URL, untill you play it.
moviePlayer.PrepareToPlay();
// Enable the embeded video controls of the Video Player, this has several types of Embedded controls for you to choose
moviePlayer.ControlStyle = MPMovieControlStyle.Default;
View.AddSubview(moviePlayer.View);
After adding code
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
<key>NSExceptionDomains</key>
<dict>
<key>clips.vorwaerts-gmbh.de</key>
<dict>
<key>NSExceptionAllowsInsecureHTTPLoads</key>
<true/>
<key>NSIncludesSubdomains</key>
<true/>
</dict>
</dict>
</dict>
I am able to play video using below URL: http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4
How to play YouTube video coming in API response?
[
{
"VideoId": 1,
"VideoTitle": "Selena Gomez testimony hillsong conference 2017",
"VideoUrl": "https://www.youtube.com/watch?v=9SdF_1OrN0Y"
}
]