Brightcove Plugin iOS
From Engineering Client Portal
Supported Ad Frameworks
- FreeWheel
- OnceUX
- Google IMA
Nielsen App SDK Plugin for Brightcove interacts with Nielsen App SDK to provide with necessary data for streaming measurement based on the SDK events received from the Brightcove Player SDK.
Plugin Implementation
Pre-requisites
- Nielsen SDK Configuration Form: Complete this form to receive the appid(s). The information on this form is required to set up the Content Management System (CMS) mapping for the app.
- Nielsen App ID (appid): A unique ID that Nielsen assigns to the site / player.
- Nielsen App SDK Plugin for Brightcove: The download link for the Plugin Packages are provided with the Nielsen appid(s).
- For Ad Support: Google IMA, FreeWheel and OnceUX SDK.
- Test Environment Validation: Before moving the app into production, Nielsen must validate the Plugin’s integration in a test environment.
Initial Configuration
Before integrating the Plugin, make sure to download the following:
- Download the Brightcove Player SDK for iOS from Brightcove’s website.
- Download the Nielsen Plugin Package, which includes:
- The Nielsen App SDK Plugin for Brightcove source code and
- The sample application source code which supports Brightcove’s FreeWheel and Google IMA ad Plugin.
Note:The sample apps in this package will not compile until the necessary frameworks are imported. Refer to setup instructions below.
- Nielsen SDK Package
- Please contact your Nielsen TAM to get the latest package.
- Brightcove Ad Plugins
- Download the Brightcove, OnceUX, Google IMA and FreeWheel plugins from the Brightcove’s website.
Initialization with Global Parameters
To initialize the Plugin that initializes the App SDK, pass the global parameters in JSON string format. Some of the global parameters are:
- Nielsen App ID (appid)
- appversion
- appname
- sfcode
- dma
- ccode
- CMS Metadata
For more details refer to the Nielsen SDK documentation.
Setup
The steps for setting up the Nielsen App SDK Plugin for Brightcove Player are as follows:
Nielsen App SDK Plugin Package Installation
For FreeWheel ad support
- Download the latest Nielsen Brightcove Plugin package (NielsenBrightcovePluginForiOS.zip) provided by Nielsen Technical Account Manager.
- Download the latest Brightcove Player SDK from the site (https://github.com/brightcove/brightcove-player-sdk-ios). Both static and dynamic frameworks can be imported and used to build the application. Nielsen sample app is built using a static framework.
- Download the latest Nielsen SDK package provided by Nielsen Technical Account Manager.
- Drag and drop both the "NielsenAppApi.framework" from the Nielsen SDK package and the "BrightcovePlayerSDK.framework" downloaded from the Brightcove site to NielsenSampleApp project.
- Download the AdManager framework from the freewheel site and copy the framework to the sample application along with Brightcove FreeWheel Plugin Framework downloaded from the site (https://github.com/brightcove/brightcove-player-sdk-ios-fw).
- On the Build Phases (tab) of the application target, ensure that all the required frameworks are added under Link Binary with Libraries.
- Build the app.
For OnceUX ad support
- Unzip the NielsenBrightcovePluginForiOS.zip.
- Copy "NielsenAppApi.framework" to the NielsenBrightcovePluginForiOS\NielsenSampleAppOnceUX folder.
- Install [Brightcove Player SDK](https://github.com/brightcove/brightcove-player-sdk-ios).
- Drag and drop both "NielsenAppApi.framework" and "BrightcovePlayerSDK.framework" to NielsenSampleAppOnceUX project. On the Build Phases (tab) of the application target, ensure that all the required frameworks are added under Link Binary with Libraries.
- Click ‘+’ sign and add "NielsenAppApi.framework" and "BrightcovePlayerSDK.framework".
- Download the latest zipped release of the BrightcoveOUX plugin from (https://github.com/brightcove/brightcove-player-sdk-ios-oux/releases).
- Unzip the files.
- Rename extracted directory to "Brightcove-Player-SDK-OUX".
- Copy the directory to the NielsenBrightcovePluginForiOS/NielsenSampleAppOnceUX folder.
- Drag and drop the whole Brightcove-Player-SDK-OUX directory to NielsenSampleAppOnceUX project.
- Build the app.
For Google IMA ad support
- Download the latest Nielsen Brightcove Plugin package (NielsenBrightcovePluginForiOS.zip) provided by Nielsen Technical Account Manager.
- Download Brightcove Player SDK from the release page: (https://github.com/brightcove/brightcove-player-sdk-ios/releases). Both static and dynamic frameworks can be imported and used to build the application. Nielsen sample app is built using a static framework.
- Download the latest Brightcove IMA SDK from the Brightcove site (https://github.com/brightcove/brightcove-player-sdk-ios-ima/releases).
- Download IMA iOS SDK from Google webpage (https://developers.google.com/interactive-media-ads/docs/sdks/ios/download).
- Download the latest Nielsen SDK package provided by Nielsen Technical Account Manager.
- Import all the frameworks: "NielsenAppApi.framework", "BrightcovePlayerSDK.framework", "GoogleInteractiveMediaAds.framework" and "BrightcoveIMA.framework" to the NielsenSampleApp project.
- On the Build Phases (tab) of the application target, ensure that all the required frameworks are added under Link Binary with Libraries.
- Build the app.
Nielsen App SDK Plugin Creation
The Nielsen App SDK Plugin for Brightcove integrates with the Brightcove SDK by listening for events from the player, other plugins and emits events for the player. It is also a wrapper for the Nielsen App SDK. It is registered with the Brightcove SDK when it is instantiated by the application.
Perform the following in the app view controller, where the player is initialized.
- Import plugin
#import <NielsenBrightcovePlugin/NielsenBrightcovePlugin.h>
- Add propertyInstantiate the plugin and register it with an instance of ‘BrightcovePlaybackController’ based on the app information provided by Nielsen.
@property (nonatomic, strong) NielsenBrightcovePlugin *brightcovePlugin;
self.brightCovePlugin = [[NielsenBrightcovePlugin alloc] initWithAppInfo:@{@"appid": @"MY_APP_ID", @"appversion": @"MY_APP_VERSION", @"appname": @"MY_APP_NAME", @"sfcode": @"MY_SFCODE"}; self.brightcovePlugin.dataSource = self; playbackController.delegate = self.brightcovePlugin; playbackController addSessionConsumer:self.brightcovePlugin];
- Implement ‘NielsenBrightcoveDataSource’ delegate by adding the methods mentioned below:
– (NSDictionary *)contentMetadataForVideo:(BCOVVideo *)video – (NSMutableDictionary *)adMetadataForVideo:(BCOVAd *)ad;
Plugin calls this method to fetch content metadata for the video.
Refer to the iOS SDK API Reference on the exact format of this dictionary. Set any key-value pair from the content metadata with an exception of ‘length’, ‘type’ and ‘title’, which are pre-set already.
Add the following line of code (optional):
– (NSDictionary *)channelInfoForVideo:(BCOVVideo *)video
Plugin calls this method to request for channel information associated with the video.
Refer to the iOS SDK API Reference on the exact format of this dictionary.
The updateOTT method is used to notify App SDK that the remote OTT device (like Google ChromeCast, Roku, Amazon FireTV, etc.) is connected / disconnected (change of OTT status).
– (void)updateOTT:(id)ottInfo;
Refer to the iOS SDK API Reference for more information and example.
Opt-Out
The app needs to provide a way for the user to optout of metering. This is done by displaying Opt-Out page and passing the user’s response back to Nielsen, as described in the iOS SDK API Reference of the Nielsen SDK Documentation. The plugin exposes the optOutURLString
method to display the Opt-Out page.
-(NSString *)optOutURLString;
Refer to the iOS SDK API Reference for more information and example.
SampleApp
Check the Nielsen Brightcove sample apps to learn about usage of plugin and the Opt-Out page.
Releases
Name | Version # | Date | Comments |
---|---|---|---|
Nielsen App SDK Plugin for Brightcove (FreeWheel & OnceUX) | 1.0.0 | 01/11/2016 | Initial version of the Nielsen App SDK Plugin for Brightcove (iOS) with support for FreeWheel & OnceUX ads. |
Nielsen AppSDK Plugin for Brightcove FreeWheel | 1.2.0 | 04/29/2016 | Reflects changes as per latest Nielsen App SDK v5.1.0.5. |
Nielsen AppSDK Plugin for Brightcove (FreeWheel, Google IMA & OnceUX) | 1.2.1 | 07/22/2016 | Brigtcove release with support for Freewheel, Google IMA & OnceUX ads. |
Nielsen AppSDK Plugin for Brightcove (FreeWheel and Google IMA) | 1.3.0 | 03/03/2017 | Brightcove release as per latest Nielsen SDK version v5.1.1.17
|