public override void ViewDidLoad() { base.ViewDidLoad(); var fairPlayAuthProxy = new BCOVFPSBrightcoveAuthProxy(null, null); // Create chain of session providers // And upstream session provider to link to. If nil, a BCOVBasicSessionProvider will be used. var fps = sdkManager.CreateFairPlaySessionProviderWithAuthorizationProxy(fairPlayAuthProxy, null); // Create the playback controller playbackController = sdkManager.CreateFairPlayPlaybackControllerWithAuthorizationProxy(fairPlayAuthProxy); playbackController.SetAutoPlay(true); playbackController.SetAutoAdvance(false); playbackController.Delegate = new BCPlaybackControllerDelegate(); //create the playerview var options = new BCOVTVPlayerViewOptions() { PresentingViewController = this, }; var playerView = new BCOVTVPlayerView(options); playerView.PlaybackController = playbackController; playerView.ControlsView.ProgressView.MinimumTrackTintColor = UIColor.Blue; playerView.SettingsView.TopTabBarItemViews = new BCOVTVTabBarItemView[0]; playerView.ShowView(BCOVTVShowViewType.Controls); playerView.Frame = View.Frame; View.AddSubview(playerView); playbackService.FindVideoWithVideoID(videoID: videoId, parameters: new NSDictionary(), completionHandler: (arg1, arg2, arg3) => { if (arg1 != null) { playbackController.SetVideos(NSArray.FromObjects(arg1)); } else { Debug.WriteLine($"View Controller Debug - Error retrieving video : {arg3.LocalizedDescription} "); } }); }
public override void ViewDidLoad() { base.ViewDidLoad(); var options = new BCOVTVPlayerViewOptions() { PresentingViewController = this, }; var playerView = new BCOVTVPlayerView(options); var playbackController = BCOVPlayerSDKManager.SharedManager().CreatePlaybackController(); playbackController.SetAutoPlay(true); playbackController.SetAutoAdvance(true); playbackController.Delegate = new BCPlaybackControllerDelegate(); BCOVPlaybackService playbackService = new BCOVPlaybackService(accountId: accountID, policyKey: policyKEY); playbackService.FindVideoWithVideoID(videoID: videoId, parameters: new NSDictionary(), completionHandler: (arg1, arg2, arg3) => { if (arg1 != null) { playbackController.SetVideos(NSArray.FromObjects(arg1)); } else { Debug.WriteLine($"View Controller Debug - Error retrieving video : {arg3.LocalizedDescription} "); } }); playerView.PlaybackController = playbackController; //playerView.TranslatesAutoresizingMaskIntoConstraints = false; playerView.Frame = View.Frame; playerView.ControlsView.ProgressView.MinimumTrackTintColor = UIColor.Blue; playerView.ShowView(BCOVTVShowViewType.Controls); View.AddSubview(playerView); }