示例#1
0
        protected override void OnCreate(Bundle bundle)
        {
            base.OnCreate(bundle);

            // Set our view from the "main" layout resource
            SetContentView(Resource.Layout.Main);

            // Get our button from the layout resource,
            // and attach an event to it
            Button button = FindViewById <Button>(Resource.Id.MyButton);

            RxMediaPlayerImplementation Player = new RxMediaPlayerImplementation();

            button.Click += delegate { Player.Play(); };



            CrossRxMediaPlayer.Init(this);

            CrossRxMediaPlayer.Current.InitPlayer();


            RxVideoView videoView = FindViewById <RxVideoView>(Resource.Id.MyVideo);

            CrossRxMediaPlayer.Current.ConnectView(videoView);

            CrossRxMediaPlayer.Current.SetMediaUrlSource("https://d2fx94pz3d1i3p.cloudfront.net/NUEbfYA4Rk47xX6B.mp4");
        }
示例#2
0
        protected override void OnCreate(Bundle bundle)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(bundle);

            global::Xamarin.Forms.Forms.Init(this, bundle);


            CrossRxMediaPlayer.Init(this);

            CrossRxMediaPlayer.Current.InitPlayer();

            LoadApplication(new FormsSample.App());
        }