예제 #1
0
 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();
 }
예제 #2
0
        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();
            }
        }