public override void LoadView() { base.LoadView(); View.BackgroundColor = UIColor.White; _startButton = new UIButton(UIButtonType.System); _startButton.SetTitle("Click me", UIControlState.Normal); View.AddSubview(_startButton); castManager = OOCastManager.CastManagerWithAppID("4172C76F", "urn:x-cast:ooyala"); castManager.WeakDelegate = this; var options = new OOAssetDownloadOptions(); options.Pcode = "c0cTkxOqALQviQIGAHWY5hP0q9gU"; options.EmbedCode = _embedCode; options.Domain = new OOPlayerDomain("http://www.ooyala.com"); //options.EmbedTokenGenerator = new TokenGenerator(); var manager = new OOAssetDownloadManager(options); manager.WeakDelegate = this; manager.StartDownload(); var castPlayer = new OOOoyalaPlayer( pcode: "c0cTkxOqALQviQIGAHWY5hP0q9gU", domain: new OOPlayerDomain("http://www.ooyala.com")); castPlayer.InitCastManager(castManager); var rightButton = new UIBarButtonItem(castManager.CastButton); NavigationItem.RightBarButtonItem = rightButton; _castVC = new OOOoyalaPlayerViewController(player: castPlayer); }
public void PersistedContentKeyAtLocation(OOAssetDownloadManager manager, NSUrl location) { System.Diagnostics.Debug.WriteLine($"Persisted at: {location}"); _cacheLocation = location; }
public void DownloadCompletedAtLocation(OOAssetDownloadManager manager, NSUrl location, OOOoyalaError error) { System.Diagnostics.Debug.WriteLine($"Completed!: {location}"); _cacheLocation = location; }
public void DownloadPercentage(OOAssetDownloadManager manager, double percentage) { System.Diagnostics.Debug.WriteLine($"PERCENT COMPLETE: {percentage}"); }
public void DownloadTaskStartedWithError(OOAssetDownloadManager manager, OOOoyalaError error) { System.Diagnostics.Debug.WriteLine($"ERROR: {error}"); }