Exemple #1
0
        protected override async void OnElementChanged(Xamarin.Forms.Platform.iOS.ElementChangedEventArgs <VidyoConnector.Controls.NativeView> e)
        {
            base.OnElementChanged(e);

            if (Control == null)
            {
                // Instantiate the native control and assign it to the Control property with
                // the SetNativeControl method
                _uiView = new UIView()
                {
                    ContentMode = UIViewContentMode.ScaleToFill
                };
                SetNativeControl(_uiView);
            }

            if (e.OldElement != null)
            {
                // Unsubscribe from event handlers and cleanup any resources
                VidyoController.GetInstance().Cleanup();
            }

            if (e.NewElement != null)
            {
                // Configure the control and subscribe to event handlers
                e.NewElement.Handle = this.Control.Handle;
                await this.AuthorizeMediaUse();
            }
        }
        protected override void OnElementChanged(Xamarin.Forms.Platform.Android.ElementChangedEventArgs <VidyoConnector.Controls.NativeView> e)
        {
            base.OnElementChanged(e);

            if (Control == null)
            {
                // Instantiate the native control and assign it to the Control property with
                // the SetNativeControl method
                _frameLayout = new FrameLayout(this.Context);
                SetNativeControl(_frameLayout);
            }

            if (e.OldElement != null)
            {
                // Unsubscribe from event handlers and cleanup any resources
                VidyoController.GetInstance().Cleanup();
            }

            if (e.NewElement != null)
            {
                // Configure the control and subscribe to event handlers

// For some reason, when DisplayMetrics is referenced, the UI preview in MainPage.xaml.cs is not shown.
// Set #if to false if you want to see a valid preview of the UI.
#if true
                DisplayMetrics displayMetrics = Application.Context.Resources.DisplayMetrics;
                e.NewElement.Density = displayMetrics.Density;
#endif
                e.NewElement.Handle = this.Control.Handle;
            }
        }
Exemple #3
0
        public override bool FinishedLaunching(UIApplication uiApplication, NSDictionary launchOptions)
        {
            global::Xamarin.Forms.Forms.Init();
            try {
                LoadApplication(new App(VidyoController.GetInstance()));
            } catch (Exception e) {
                Logger.GetInstance().Log(e.Message);
            }

            return(base.FinishedLaunching(uiApplication, launchOptions));
        }
Exemple #4
0
        private void Control_Loaded(object sender, RoutedEventArgs e)
        {
            var panelHwnd = new IntPtr(); //(HwndSource)System.Windows.PresentationSource.FromVisual(_uiView);

            if (panelHwnd != null)
            {
                VidyoController vidyoController = VidyoController.GetInstance();
                //this sets the _videoView's handle and calls appStart
                //vidyoController.SetNativeHandle(panelHwnd.Handle);
                vidyoController.OnAppStart();
            }
        }
Exemple #5
0
        protected override void OnCreate(Bundle savedInstanceState)
        {
            TabLayoutResource = Resource.Layout.Tabbar;
            ToolbarResource   = Resource.Layout.Toolbar;

            base.OnCreate(savedInstanceState);

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

            try {
                LoadApplication(new App(VidyoController.GetInstance()));
            } catch (Exception e) {
                Logger.GetInstance().Log(e.Message);
            }
        }
 public MainWindow()
 {
     InitializeComponent();
     Forms.Init();
     LoadApplication(new VidyoConnector.App(VidyoController.GetInstance()));
 }
Exemple #7
0
        public MainPage()
        {
            this.InitializeComponent();

            LoadApplication(new VidyoConnector.App(VidyoController.GetInstance()));
        }
Exemple #8
0
 public override void DidFinishLaunching(NSNotification notification)
 {
     Forms.Init();
     LoadApplication(new VidyoConnector.App(VidyoController.GetInstance()));
     base.DidFinishLaunching(notification);
 }