public async void VideoClickExecuteAfter() { try { await Task.Factory.StartNew(async() => { string url = await GetOnlineUrl(VideoInfo.VideoId); if (string.IsNullOrEmpty(url)) { await DispatcherHelper.RunAsync(() => { SheetUtility.CloseVideoPage(); MessageHelpers.ShowError("Url not found.", "Error"); }); } else { VideoModel videoModel = new VideoModel(url, true); StartPlaybackVideo?.Invoke(this, videoModel); } }); } catch { SheetUtility.CloseVideoPage(); } }
public void InvokeOffline(Video parameter) { try { var id = parameter; if (id == null) { return; } VideoModel videoModel = new VideoModel(id.VideoUrl, false); StartPlaybackVideo?.Invoke(this, videoModel); } catch { } }