Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


IRIS.TV Brightcove Player Plugin for iOS

This is a framework used to incorporate IRIS.TV's AdaptiveStream video personalization engine into the Brightcove Video Player for iOS.

Release Notes

IMPORTANT:

If your application requires IRIS.TV's default AdaptiveStream workflow, please use Version 1.0.12 of this plugin. Versions 1.0.15 and above currently offer only the alternative Recommendation Slate workflow, used when displaying multiple upcoming video recommendations within the application's UI.

...

Version 1.0.8: Fixed event when scrubbing past 75% - sends more accurate behavior in milestone call Disabled previous button when viewing 1st video Removed duplicate videos with different iris_IDs but same platform_ID Other minor bug fixes

Installation

First, you must properly install CocoaPods: https://guides.cocoapods.org/using/getting-started.html

...

Code Block
pod ‘Brightcove-Player-Core/dynamic’
pod ‘BCOVIRISTV’, :git => 'https://github.com/jbtv/iris_brightcove_ios_pod.git', :tag => ‘1.1.0’

Integration

The IRIS.TV Brightcove iOS Player plugin subclasses the Brightcove Player classes for easy integration with Brightcove’s current SDK.

...

**Note that custom controls are not implicitly linked to the IRIS.TV methods. These methods are publically accessible and should be called manually corresponding to new controls:

Code Block

(void)playPause;
  (void)playNext;
  (void)playPrev;
  (void)sliderTapped:(UIGestureRecognizer *)gestureRecognizer;
  (void)thumbsUp:(UIButton *)sender;
  (void)thumbsDown:(UIButton *)sender;

...

Code Block
BCOVCatalogService *catalog = [[BCOVcatalogService alloc] initWithToken:kViewControllerCatalogToken];
    [catalog findVideoWithVideoID:kPlatformID parameters:nil completion:^(BCOVVideo *video, NSDictionary *jsonResponse, NSError *error) {
        
        if (video)
        {
            [self.playbackController setVideos:@[ video ]];
        }
        else
        {
            NSLog(@"ViewController Debug - Error retrieving video: `%@`", error);
        }
        
    }];

OR

  • If using the Brightcove Playback API to load the initial video, replace the setVideo statement from above with the following:

    Code Block
    BCOVPlaybackService *service = [[BCOVPlaybackService alloc] initWithAccountId:kClientToken policyKey:kViewControllerPlaybackServicePolicyKey];
        [service findVideoWithVideoID:kPlatformID parameters:nil completion:^(BCOVVideo *video, NSDictionary *jsonResponse, NSError *error) {
            
            if (video)
            {
                [self.playbackController setVideos:@[ video ]];
            }
            else
            {
                NSLog(@"ViewController Debug - Error retrieving video: `%@`", error);
            }
            
        }];


For more information about your policy key, see Brightcove's documentation on Policy Keys.

OR

  • If loading the initial video via source URL, create the video object and add to playbackController as follows:

    Code Block
    BCOVSource *source = [[BCOVSource alloc] initWithURL:kVideoURL];
    BCOVVideo *video = [[BCOVVideo alloc] initWithSource:source cuePoints:nil properties:@{@"id": kPlatformID}];
    [playbackController setVideos:@[video]];


  • If the video URL uses ‘http://...' rather than ‘https://...’ protocol, your info.plist file may need the addition of the following property:


    ...App Transport Security Settings > Allow Arbitrary Loads - YES

...

For an example on how to integrate this plugin, see: IrisBrightcoveExampleApp

...

Notes:

  • In the unlikely event that no more unique videos are available from the Brightcove account that is in use, the following exception will be raised from within the plugin:

...

  • In the event of an unsuccessful video request to the Brightcove CMS, the PlaylistDelegate will redirect this error through this function, which should be implemented in the native application:

    Code Block
    -(void)handleVideoRequestErrorEvent:(NSError*)error {
      // Handle error here
    }


...

Please contact your IRIS.TV Account Executive for access to these GitHub repositories.



IRISTV Brightcove Player Plugin Architecture