public void OpenGame(EduItem webpage) { if (_core.TryGetWebBrowser(out IWebBrowserPlugin web)) { web.OpenUnmanaged(_core.HttpClient.RelativeToAbsoluteUri(webpage.DataUrl[0].Url)); } }
public void OpenVideo(EduItem video) { if (video.DataUrl.Count <= 0) { return; } if (_core.TryGetMediaPlayerContainer(out IMediaPlayerContainer player)) { player.Play(new MediaRequest(new IptvMedia { URL = _core.HttpClient.RelativeToAbsoluteUri(video.DataUrl[0].Url), Name = video.Name }) { AllowPip = true }); } }
public void OpenAudio(EduItem video) { if (video.DataUrl.Count <= 0) { return; } if (_core.TryGetMediaPlayerContainer(out IMediaPlayerContainer player)) { player.Play(new MediaRequest(new IptvMedia { URL = _core.HttpClient.RelativeToAbsoluteUri(video.DataUrl[0].Url), Name = video.Name }) { AllowPip = false, ShowVideo = false, MediaPlayerPosition = MediaPlayerPosition.Notification, FullscreenMode = FullscreenMode.NoFullscreen, }); } }
public void OpenEbook(EduItem book) { var pl = _core.PluginLoader.GetPlugins <IBooksPlugin>().FirstOrDefault(); if (pl == null) { return; } pl.OpenBook(new Modularity.Books.Models.Book() { DataUrl = book.DataUrl, Name = book.Name, ImgThumbnail = book.ImgThumbnail, Description = book.Description }, "Education"); //var json = _serializer.Serialize(book); //_comm.RaiseEvent("books-openbook", this, // new Dictionary<string, object> { { "bookJsonObj", json }, { "plugin", "Education" } }); }
public void OpenQuestionnaire(EduItem book) { //todo _comm.RaiseEvent("questionnaire-open", this, new Dictionary<string, dynamic> { { "questionnaireid", book.Id } }); }