Beispiel #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="MainWindow" /> class.
        /// </summary>
        public MainWindow()
        {
            _mediaPlayer = new MediaPlayerConsumer();

            InitializeComponent();
            _spotify = new SpotifyAPI();

            SetUserInfo();

            CurrentPage.Content = new HomePage();
        }
Beispiel #2
0
        private async void MediaPlayerWatcher_Added(MediaPlayerWatcher sender, AllJoynServiceInfo args)
        {
            var joinResult = await MediaPlayerConsumer.JoinSessionAsync(args, sender);

            if (joinResult.Status == AllJoynStatus.Ok)
            {
                _mediaPlayerConsumer              = joinResult.Consumer;
                _mediaPlayerConsumer.SessionLost += this.Consumer_SessionLost;

                // subscribe to value changes

                // populate initial values

                this.IsConnected = true;
            }
        }