public async void Play(MediaElement mediaElement) { try { Show(); MinistaPlayer = new MinistaPlayer(); await MinistaPlayer.Initialize(new Uri(Broadcast.DashPlaybackUrl), mediaElement); mediaElement.CurrentStateChanged += MediaElementCurrentStateChanged; Hide(); } catch (Exception ex) { ex.PrintException("LiveBroadcastView.Play"); } }
public async void Dispose() { try { await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { Stop(); Timer.Stop(); Timer = null; MinistaPlayer = null; }); } catch { } }