public ViewController(IntPtr handle) : base(handle) { Player = VMediaPlayer.SharedInstance(); Player.SetupPlayerWithCarrierView(this.View, new VdoDelegate(this)); Player.SetDataSource(new NSUrl("http://qthttp.apple.com.edgesuite.net/1010qwoeiuryfg/sl.m3u8")); Player.PrepareAsync(); }
protected override void OnElementChanged(VisualElementChangedEventArgs e) { base.OnElementChanged(e); Player = VMediaPlayer.SharedInstance(); if (VideoCountiOS.Count == 1) { Player.SetupPlayerWithCarrierView(this.View, new VdoDelegate(this)); Player.SetDataSource(NSUrl.FromString(UrlCamera.Url)); Player.PrepareAsync(); VideoCountiOS.Count = 2; } else { //need to be used when have a navigation page and want turn back to the video Player.UnSetupPlayer(); Player.SetupPlayerWithCarrierView(this.View, new VdoDelegate(this)); Player.SetDataSource(NSUrl.FromString(UrlCamera.Url)); Player.PrepareAsync(); } }