示例#1
0
        async void StartNext(double currentPosition)
        {
            if (nextSong == CurrentSong)
            {
                return;
            }
            var playbackEndEvent = new PlaybackEndedEvent(CurrentSong)
            {
                TrackId  = Settings.CurrentTrackId,
                Context  = Settings.CurrentPlaybackContext,
                Position = currentPosition,
                Duration = Duration(),
                Reason   = ScrobbleManager.PlaybackEndedReason.PlaybackEnded,
            };

            fadingToSong = SecondarySong;
            SecondaryPlayer.Play();
            isUsingFirst = !isUsingFirst;

            ScrobbleManager.Shared.PlaybackEnded(playbackEndEvent);

                        #pragma warning disable 4014
            eqApplied = false;
            PlaybackManager.Shared.NextTrackWithoutPause();
            Parent.CleanupSong(CurrentSong);
        }
示例#2
0
 void PlayerFinished(AVPlayerItem item)
 {
     if (CurrentItem == item)
     {
         SecondaryPlayer.Play();
     }
     if (player1.CurrentItem == item)
     {
         ResetPlayer1();
     }
     else if (player2.CurrentItem == item)
     {
         ResetPlayer2();
     }
 }