public static void PlayVLCWithSingleUrl(string url, string name = "", string subtitleLoc = "", bool?overrideSelectVideo = null) { //PlayVlc?.Invoke(null, url); bool useVideo = overrideSelectVideo ?? Settings.UseVideoPlayer; if (useVideo) { Page p = new VideoPage(new VideoPage.PlayVideo() { descript = "", name = "", isSingleMirror = true, episode = -1, season = -1, MirrorNames = new List <string>() { name }, MirrorUrls = new List <string>() { url }, Subtitles = new List <string>(), SubtitlesNames = new List <string>() }); //new List<string>() { "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" }, new List<string>() { "Black" }, new List<string>() { });// { mainPoster = mainPoster }; ((MainPage)CloudStreamCore.mainPage).Navigation.PushModalAsync(p, false); } else { platformDep.PlayVlc(url, name, subtitleLoc); } //platformDep.PlayVlc(url, name, subtitleLoc); }
public MainPage() { InitializeComponent(); try { App.OnAppReopen += (o, e) => { if (VideoPage.CanReopen) { VideoPage.CanReopen = false; LoadVideoPage(); } }; App.OnAppNotInForground += (o, e) => { App.SaveData(); }; mainPage = this; CloudStreamCore.mainPage = mainPage; #if DEBUG System.AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionTrapper; #endif if (IS_TEST_VIDEO) { Page p = new VideoPage(new VideoPage.PlayVideo() { descript = "", name = "Black Bunny", episode = -1, season = -1, MirrorNames = new List <string>() { "Googlevid" }, MirrorUrls = new List <string>() { "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" } }); //new List<string>() { "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" }, new List<string>() { "Black" }, new List<string>() { });// { mainPoster = mainPoster }; mainPage.Navigation.PushModalAsync(p, false); print("PUST: ::: :"); } if (IS_EMTY_BUILD) { return; } List <string> names = new List <string>() { "Home", "Search", "Downloads", "Settings" }; //List<string> icons = new List<string>() { "homeIcon.png", "searchIcon.png", "downloadIcon.png", "baseline_settings_applications_white_48dp_inverted_big.png" }; List <Page> pages = new List <Page>() { new Home(), new Search(), new Download(), new SettingsPage(), }; for (int i = 0; i < pages.Count; i++) { Children.Add(pages[i]); Children[i].Title = names[i]; Children[i].IconImageSource = baseIcons[i]; } On <Xamarin.Forms.PlatformConfiguration.Android>().SetToolbarPlacement(ToolbarPlacement.Bottom); LateCheck(); } catch (Exception) { } /* * if (Settings.IS_TEST_BUILD) { * return; * } * try { * OnIconStart(0); * * int oldPage = 0; * CurrentPageChanged += (o, e) => { * try { * OnIconEnd(oldPage); * for (int i = 0; i < pages.Count; i++) { * if ((pages[i].GetType()) == CurrentPage.GetType()) { * OnIconStart(i); * oldPage = i; * } * } * } * catch (Exception _ex) { * error(_ex); * } * }; * } * catch (Exception _ex) { * error(_ex); * }*/ // BarBackgroundColor = Color.Black; // BarTextColor = Color.OrangeRed; //Page _p = new ReviewPage("tt0371746", "Iron Man"); //MainPage.mainPage.Navigation.PushModalAsync(_p); //PushPageFromUrlAndName("tt4869896", "Overlord"); // PushPageFromUrlAndName("tt0409591", "Naruto"); // PushPageFromUrlAndName("tt10885406", "Ascendance of a Bookworm"); // PushPageFromUrlAndName("tt9054364", "That Time I Got Reincarnated as a Slime"); // PushPageFromUrlAndName("tt0371746", "Iron Man"); // PushPageFromUrlAndName("tt10954274", "ID: Invaded"); }