Exemplo n.º 1
0
 private void OnAudioPlayerStateChanged(AudioPlayerState audioPlayerState)
 {
     if (audioPlayerState != AudioPlayerState)
     {
         AudioPlayerState = audioPlayerState;
         AudioPlayerStateChanged.Invoke(audioPlayerState);
     }
 }
Exemplo n.º 2
0
 private void SetAudioPlayerStatus(AudioPlayerState audioPlayerState = AudioPlayerState.Closed)
 {
     if (audioPlayerState != _audioPlayerState)
     {
         _audioPlayerState = audioPlayerState;
         if (_audioPlayerState == AudioPlayerState.Stopped)
         {
             Finished?.Invoke(this, new EventArgs());
         }
         AudioPlayerStateChanged?.Invoke(audioPlayerState);
     }
 }
Exemplo n.º 3
0
        public void Handle(AudioPlayerStateChanged message)
        {
            this.NotifyChanged();

            if (this.IsCurrentTrack)
            {
                if (BGAudioPlayerWrapper.Instance.PlayerState == PlayState.Playing)
                {
                    this.PlayVisibility = Visibility.Collapsed;
                }
                else
                {
                    this.PlayVisibility = Visibility.Visible;
                }
            }
            else
            {
                this.PlayVisibility = Visibility.Visible;
            }
        }
Exemplo n.º 4
0
 public void Handle(AudioPlayerStateChanged message)
 {
     this.UpdateUIState();
 }