Пример #1
0
        public async Task HandleAsync(StopCommand command)
        {
            Log.Info("Processing SetActivePlaylistCommand");

            _soundOutput.Stop();

            _spotifySession.PlayerPlay(false);

            _session.PlayerState = PlayerState.Stopped;
        }
Пример #2
0
        public async Task HandleAsync(PreviousSongCommand message)
        {
            Log.Info("Processing PreviousSongCommand");

            var playlistPlayStrategy = _session.PlaylistPlayStrategy;

            var track = playlistPlayStrategy.Previous();

            await track.Load();

            _spotifySession.PlayerLoad(track);

            if (_session.PlayerState == PlayerState.Playing)
            {
                _spotifySession.PlayerPlay(true);
            }
        }
        private void LoadTrack(ITrack track)
        {
            _spotifySession.PlayerLoad(track);

            _spotifySession.PlayerPlay(true);
        }