void SystemControlsHandleButton(SystemMediaTransportControlsButton button) { Debug.WriteLine("MainPage.SystemControlsHandleButton"); switch (button) { case SystemMediaTransportControlsButton.Play: OnPlay(); break; case SystemMediaTransportControlsButton.Pause: mediaElement1.Pause(); break; case SystemMediaTransportControlsButton.Stop: mediaElement1.Stop(); break; case SystemMediaTransportControlsButton.Next: OnNext(); break; case SystemMediaTransportControlsButton.Previous: OnPrevious(); break; } }
void SystemControlsHandleButton(SystemMediaTransportControlsButton button) { if (button == SystemMediaTransportControlsButton.Play) { PlayPauseAction.Invoke(); } else if (button == SystemMediaTransportControlsButton.Pause) { PlayPauseAction.Invoke(); } else if (button == SystemMediaTransportControlsButton.Stop) { PlayPauseAction.Invoke(); } }
private void MediaTransportControlButtonPressed(SystemMediaTransportControlsButton button) { switch (button) { case SystemMediaTransportControlsButton.Play: Play(); return; case SystemMediaTransportControlsButton.Pause: Pause(); return; case SystemMediaTransportControlsButton.Previous: Previous(); return; case SystemMediaTransportControlsButton.Next: Next(IsPlaying); return; } }
private void MediaTransportControlButtonPressed(SystemMediaTransportControlsButton button) { switch (button) { case SystemMediaTransportControlsButton.Play: library.IsPlaying = true; return; case SystemMediaTransportControlsButton.Pause: library.IsPlaying = false; return; case SystemMediaTransportControlsButton.Previous: BackgroundPlayer.Previous(); return; case SystemMediaTransportControlsButton.Next: BackgroundPlayer.Next(false); return; } }
void HandleSmtcButton(MediaPlayerManager mediaPlayerManager, SystemMediaTransportControlsButton button) { Debug.WriteLine("BackgroundAudioRun.HandleSmtcButton() " + _id + " button " + button); try { switch (button) { case SystemMediaTransportControlsButton.Play: mediaPlayerManager.Play(); break; case SystemMediaTransportControlsButton.Pause: mediaPlayerManager.Pause(); break; case SystemMediaTransportControlsButton.Next: _systemMediaTransportControls.PlaybackStatus = MediaPlaybackStatus.Changing; mediaPlayerManager.Next(); break; case SystemMediaTransportControlsButton.Previous: _systemMediaTransportControls.PlaybackStatus = MediaPlaybackStatus.Changing; mediaPlayerManager.Previous(); break; case SystemMediaTransportControlsButton.Stop: mediaPlayerManager.Stop(); break; } } catch (Exception ex) { Debug.WriteLine("BackgroundAudioRun.HandleSmtcButton() failed " + ex.ExtendedMessage()); } }
public static void NotifyBackground(this MediaPlayerHandle handle, SystemMediaTransportControlsButton button) { handle.NotifyBackground(BackgroundNotificationType.Smtc, button.ToString()); }
void IAudioController.OnMediaTransportControlsButtonPressed(SystemMediaTransportControlsButton button) { OnMediaTransportControlsButtonPressed(button); }
private void OnMediaTransportControlsButtonPressed(SystemMediaTransportControlsButton button) { switch (button) { case SystemMediaTransportControlsButton.Play: Play(); break; case SystemMediaTransportControlsButton.Pause: Pause(); break; case SystemMediaTransportControlsButton.Stop: break; case SystemMediaTransportControlsButton.Record: break; case SystemMediaTransportControlsButton.FastForward: break; case SystemMediaTransportControlsButton.Rewind: break; case SystemMediaTransportControlsButton.Next: MoveNext(); break; case SystemMediaTransportControlsButton.Previous: MovePrevious(); break; case SystemMediaTransportControlsButton.ChannelUp: break; case SystemMediaTransportControlsButton.ChannelDown: break; default: break; } }
void HandleSmtcButton(MediaPlayerManager mediaPlayerManager, SystemMediaTransportControlsButton button) { Debug.WriteLine("BackgroundAudioRun.HandleSmtcButton() " + _id + " button " + button); try { switch (button) { case SystemMediaTransportControlsButton.Play: mediaPlayerManager.Play(); break; case SystemMediaTransportControlsButton.Pause: mediaPlayerManager.Pause(); break; case SystemMediaTransportControlsButton.Next: _systemMediaTransportControls.PlaybackStatus = MediaPlaybackStatus.Changing; mediaPlayerManager.Next(); break; case SystemMediaTransportControlsButton.Previous: _systemMediaTransportControls.PlaybackStatus = MediaPlaybackStatus.Changing; mediaPlayerManager.Previous(); break; case SystemMediaTransportControlsButton.Stop: mediaPlayerManager.Stop(); break; } } catch (Exception ex) { Debug.WriteLine("BackgroundAudioRun.HandleSmtcButton() failed " + ex.ExtendedMessage()); } }
void SystemControlsHandleButton(SystemMediaTransportControlsButton button) { Debug.WriteLine("MainPage.SystemControlsHandleButton"); switch (button) { case SystemMediaTransportControlsButton.Play: OnPlay(); break; case SystemMediaTransportControlsButton.Pause: mediaElement1.Pause(); break; case SystemMediaTransportControlsButton.Stop: mediaElement1.Stop(); break; case SystemMediaTransportControlsButton.Next: OnNext(); break; case SystemMediaTransportControlsButton.Previous: OnPrevious(); break; } }
public UVCButtonPressedMessage(SystemMediaTransportControlsButton button) { Button = button; }
public static void NotifyBackground(this MediaPlayerHandle handle, SystemMediaTransportControlsButton button) { handle.NotifyBackground(BackgroundNotificationType.Smtc, button.ToString()); }