void InitializeCast() { DiscoveryCriteria discoveryCriteria = new DiscoveryCriteria(castReceiverId); CastOptions castOptions = new CastOptions(discoveryCriteria); CastContext.SetSharedInstance(castOptions); }
public bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { AVAudioSession.SharedInstance().SetCategory(AVAudioSessionCategory.Playback, AVAudioSessionCategoryOptions.DuckOthers); var discoveryCriteria = new DiscoveryCriteria("17F1E2B1"); var options = new CastOptions(discoveryCriteria); CastContext.SetSharedInstance(options); Logger.SharedInstance.Delegate = new LoggerDelegate(); var navigationController = new UINavigationController(new FairPlayCastViewController()); var castContainer = CastContext.SharedInstance.CreateCastContainerController(navigationController); castContainer.MiniMediaControlsItemEnabled = true; CastContext.SharedInstance.UseDefaultExpandedMediaControls = true; Window = new UIWindow(UIScreen.MainScreen.Bounds); Window.RootViewController = castContainer; //Window.RootViewController = new BasicPlayerViewController(); //Window.RootViewController = new FairPlayViewContoller(); Window.MakeKeyAndVisible(); return(true); }
public override bool FinishedLaunching(UIApplication application, NSDictionary launchOptions) { // Override point for customization after application launch. // If not required for your application you can safely delete this method // Contains options that affect the behavior of the framework. var options = new CastOptions(ReceiverApplicationId); // CastContext coordinates all of the framework's activities. CastContext.SetSharedInstance(options); // Google Cast Logger Logger.SharedInstance.Delegate = this; // Use UICastContainerViewController as the Initial Controller. // Wraps our View Controllers and add a UIMiniMediaControlsViewController // at the bottom; a persistent bar to control remote videos. var appStoryboard = UIStoryboard.FromName("Main", null); var navigationController = appStoryboard.InstantiateInitialViewController() as UINavigationController; var castContainer = CastContext.SharedInstance.CreateCastContainerController(navigationController); castContainer.MiniMediaControlsItemEnabled = true; // Used to highlight the Cast button when it is first shown to users. CastContext.SharedInstance.PresentCastInstructionsViewControllerOnce(); // Use Default Expanded Media Controls CastContext.SharedInstance.UseDefaultExpandedMediaControls = true; Window = new UIWindow(UIScreen.MainScreen.Bounds); Window.RootViewController = castContainer; Window.MakeKeyAndVisible(); return(true); }
public void SetupChromecast() { var discoveryCriteria = new DiscoveryCriteria("0A6928D1"); var castOptions = new CastOptions(discoveryCriteria); CastContext.SetSharedInstance(castOptions); CastContext.SharedInstance.UseDefaultExpandedMediaControls = true; }