private void HelperOnPlaybackStateChanged(object sender, PlaybackStateEventArgs playbackStateEventArgs)
        {
            IsLoading = false;
            switch (playbackStateEventArgs.State)
            {
            default:
                PlayPauseIcon = Symbol.Play;
                if (_timer.IsEnabled)
                {
                    _timer.Stop();
                }
                break;

            case MediaPlayerState.Playing:
                _timer.Start();
                PlayPauseIcon = Symbol.Pause;
                break;

            case MediaPlayerState.Buffering:
            case MediaPlayerState.Opening:
                IsLoading = true;
                if (_timer.IsEnabled)
                {
                    _timer.Stop();
                }
                break;
            }
        }
Exemple #2
0
        private void HelperOnPlaybackStateChanged(object sender, PlaybackStateEventArgs playbackStateEventArgs)
        {
            IsLoading = false;
            switch (playbackStateEventArgs.State)
            {
            case MediaPlayerState.Paused:
                PlayPauseIcon = new SymbolIcon(Symbol.Play);
                break;

            default:
                PlayPauseIcon = new SymbolIcon(Symbol.Pause);
                break;

            case MediaPlayerState.Buffering:
            case MediaPlayerState.Opening:
                IsLoading = true;
                break;
            }
        }
 private void HelperOnPlaybackStateChanged(object sender, PlaybackStateEventArgs playbackStateEventArgs)
 {
     IsLoading = false;
     switch (playbackStateEventArgs.State)
     {
         default:
             PlayPauseIcon = Symbol.Play;
             if (_timer != null && _timer.IsEnabled)
                 _timer.Stop();
             break;
         case MediaPlayerState.Playing:
             if (_timer != null && !_timer.IsEnabled)
                 _timer.Start();
             PlayPauseIcon = Symbol.Pause;
             break;
         case MediaPlayerState.Buffering:
         case MediaPlayerState.Opening:
             IsLoading = true;
             if (_timer != null && _timer.IsEnabled)
                 _timer.Stop();
             break;
     }
 }