Exemplo n.º 1
0
 private void playNextTrack()
 {
     Track = Playinglist?.GetNext(IsShuffle ? random : null) ?? null;
     if (Track is null)
     {
         trace($"playNextTrack() cannot find a track.");
         mediaPlayer.Pause();//prevents from immediate playing when user changes position
         State = PlayerStateEnum.Idle;
     }
     else
     {
         trace($"Play next {(IsShuffle ? "random " : "")}{Track.Title}");
         playtrack();
     }
 }