public static void Play() { try { Debug.WriteLine("Play"); Player.Play(); lastOrderReceived = LastMediaOrder.Play; ForcePlayNext = false; } catch (Exception ex) { CoreTools.ShowDebugToast(ex.Message, "Play"); } }
public static void Play() { try { Debug.WriteLine("Play"); if (Player.PlaybackSession.PlaybackState == MediaPlaybackState.None || Player.PlaybackSession.PlaybackState == MediaPlaybackState.Paused) { Player.Play(); } lastOrderReceived = LastMediaOrder.Play; ForcePlayNext = false; } catch (Exception ex) { CoreTools.ShowDebugToast(ex.Message, "Play"); } }
public static async void Pause(bool publish) { try { Debug.WriteLine("Pause"); Player.Pause(); lastOrderReceived = LastMediaOrder.Pause; await Playlist.CurrentPlaylist.SaveAsync(); if (publish) { await Playlist.CurrentPlaylist.PublishAsync(); } } catch (Exception ex) { CoreTools.ShowDebugToast(ex.Message, "Pause"); } }
public static void ResetLastOrderReceived() { lastOrderReceived = LastMediaOrder.None; ForcePlayNext = true; }