Esempio n. 1
0
        public override void OnCreate()
        {
            base.OnCreate();

            RegisterActivityLifecycleCallbacks(this);
            CastManager.Initialize(this, NameSpace);
            _castManager = CastManager.GetCastManager();
        }
Esempio n. 2
0
        public void UpdateCastState(Context c, OoyalaPlayer.State state)
        {
            var castDeviceName = CastManager.GetCastManager().DeviceName;

            if (state == OoyalaPlayer.State.Loading)
            {
                _stateTextView.Text = c.GetString(Resource.String.loading);
            }
            else if (state == OoyalaPlayer.State.Playing || state == OoyalaPlayer.State.Paused)
            {
                var statusString = $"{c.GetString(Resource.String.castingTo)} {castDeviceName}";
                _stateTextView.Text = statusString;
            }
            else
            {
                _stateTextView.Text = "";
            }
        }
        protected override void OnCreate(Bundle savedInstanceState)
        {
            base.OnCreate(savedInstanceState);

            // Create your application here

            var preferences = GetSharedPreferences("lastChosenParams", FileCreationMode.Private);

            _embedCode = preferences.GetString("embedCode", "");
            _pcode     = preferences.GetString("pcode", "");
            _domain    = preferences.GetString("domain", "");

            SetContentView(Resource.Layout.player_activity);
            var toolbar = FindViewById <Android.Support.V7.Widget.Toolbar>(Resource.Id.toolbar);

            SetSupportActionBar(toolbar);

            _castManager = CastManager.GetCastManager();
            InitOoyala();
            _castViewManager = new CastViewManager(this, _castManager);
        }