public void Play(QueueTrack queue)
 {
     throw new NotImplementedException();
 }
 public AddToPlaylistMessage(QueueTrack track, int position)
 {
     Tracks = new List<QueueTrack> {track};
     Position = position;
 }
Beispiel #3
0
        public void Play(QueueTrack queue)
        {
            // Switch to the selected track
            MessageHelper.SendMessageToBackground(new TrackChangedMessage(queue.Id));

            if (MediaPlayerState.Paused == BackgroundMediaPlayer.Current.CurrentState)
            {
                BackgroundMediaPlayer.Current.Play();
            }
        }
Beispiel #4
0
 private async Task<QueueTrack> InternalAddAsync(Track track, int position = -1)
 {
     var queue = new QueueTrack(track);
     if (position > -1 && position < PlaybackQueue.Count)
         PlaybackQueue.Insert(position, queue);
     else
         PlaybackQueue.Add(queue);
     MessageHelper.SendMessageToBackground(new AddToPlaylistMessage(queue, position));
     await Task.Delay(50);
     return queue;
 }
 public static void Queue(this MediaSource item, QueueTrack queue)
 {
     Set(item, TrackKey, queue);
 }