Exemplo n.º 1
0
 private void Media_IsPlayingChanged(object sender, Media.NepAppMediaPlayerManager.NepAppMediaPlayerManagerIsPlayingEventArgs e)
 {
     App.Dispatcher.RunWhenIdleAsync(() =>
     {
         UpdatePlaybackStatus(e.IsPlaying);
     });
 }
Exemplo n.º 2
0
        private void Media_IsPlayingChanged(object sender, Media.NepAppMediaPlayerManager.NepAppMediaPlayerManagerIsPlayingEventArgs e)
        {
            //if (e.IsPlaying)
            //{
            //if (NepApp.Media.CurrentStreamer != null)
            //{
            //    App.Dispatcher.RunAsync(() =>
            //    {
            //        TransportControlsGridMediaPlayerElement.SetMediaPlayer(NepApp.Media.CurrentStreamer.Player);
            //    });
            //}
            //}

            App.Dispatcher.RunAsync(() =>
            {
                if (e.IsPlaying)
                {
                    PlayButton.Label   = "Pause";
                    PlayButton.Icon    = new SymbolIcon(Symbol.Pause);
                    PlayButton.Command = ((AppShellViewModel)this.DataContext).PausePlaybackCommand;

                    HeaderControlHintIcon.Visibility = Visibility.Visible;
                }
                else
                {
                    PlayButton.Label   = "Play";
                    PlayButton.Icon    = new SymbolIcon(Symbol.Play);
                    PlayButton.Command = ((AppShellViewModel)this.DataContext).ResumePlaybackCommand;
                }
            });
        }
 private void MediaPlayer_IsPlayingChanged(object sender, Media.NepAppMediaPlayerManager.NepAppMediaPlayerManagerIsPlayingEventArgs e)
 {
     App.Dispatcher.RunWhenIdleAsync(() =>
     {
         IsPlaying = NepApp.MediaPlayer.IsPlaying;
         UpdateMetadataFollowedByArtwork();
     });
 }
Exemplo n.º 4
0
 private void Media_IsPlayingChanged(object sender, Media.NepAppMediaPlayerManager.NepAppMediaPlayerManagerIsPlayingEventArgs e)
 {
 }