Esempio n. 1
0
        public async Task Pause()
        {
            IPlaybackManager currentPlaybackManager = CurrentPlaybackManager;

            if (currentPlaybackManager != null)
            {
                await currentPlaybackManager.Pause();
            }
        }
Esempio n. 2
0
        private async void RadioPowerManager_PowerStateChanged(object sender, PowerStateChangedEventArgs e)
        {
            switch (e.PowerState)
            {
            case PowerState.Powered:

                await Task.Delay(_config.Delay);

                if (null != currentUri)
                {
                    await playChannel(currentUri);
                }
                break;

            case PowerState.Standby:
                _radioPlaybackManager.Pause();
                await Task.Delay(_config.Delay);

                break;
            }
        }