JW Player Plugin iOS: Difference between revisions

From Engineering Client Portal

(Added Version 1.2.0)
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 4: Line 4:
'''Nielsen App SDK Plugin for JW Player''' interacts with Nielsen App SDK to provide with necessary data for streaming measurement based on the SDK events received from the JW Player SDK.
'''Nielsen App SDK Plugin for JW Player''' interacts with Nielsen App SDK to provide with necessary data for streaming measurement based on the SDK events received from the JW Player SDK.


'''Supported Ad Frameworks'''
{{PluginInfobox
* VAST
|pluginImage=JWPlayerIcon
|osImage=macOSIcon
|playerVersion=2.1
|SDKVersion=5.1.0.5
|supportedAdFrameworks=VMAP and VAST
|downloadLink=https://engineeringportal.nielsen.com/w/downloads/digital/plugins/jwplayer/ios/Nielsen-App-SDK-JW-Player-Plugin-iOS-1.1.0.zip
}}


==Plugin Implementation ==
==Plugin Implementation ==
Line 41: Line 47:


===Nielsen App SDK Plugin Package Installation===
===Nielsen App SDK Plugin Package Installation===
For FreeWheel ad support
For FreeWheel ad support
* Unzip the NielsenJWPlayerPluginForiOS.zip
* Unzip the NielsenJWPlayerPluginForiOS.zip
Line 88: Line 95:


=== Opt-Out ===
=== Opt-Out ===
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).
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).


Line 94: Line 102:
This API gets the current Nielsen opt-out state of AppSDK. Call this API to retrieve the Opt-Out or Opt-In state. Refer to the [[Digital Measurement Onboarding ]] in the Nielsen SDK Documentation for more information and example.
This API gets the current Nielsen opt-out state of AppSDK. Call this API to retrieve the Opt-Out or Opt-In state. Refer to the [[Digital Measurement Onboarding ]] in the Nielsen SDK Documentation for more information and example.


* For App SDK 5.1.1.17 and above, the opt-out page can be displayed in a WebView / external browser using the optOutURL exposed by the plugin.
* For App SDK 5.1.1.17 and above, the opt-out page can be displayed in a WebView / external browser using the [[optOutURL]] exposed by the plugin.
* For App SDK 5.1.1.16 and earlier, display the opt-out page in a WebView using the optOutURL exposed by the plugin and pass the response from user back to Nielsen using the userOptOut.
* For App SDK 5.1.1.16 and earlier, display the opt-out page in a WebView using the optOutURL exposed by the plugin and pass the response from user back to Nielsen using the [[userOptOut]]. For more details, refer to [[iOS SDK API Reference#iOS Opt-Out Implementation]].


== SampleApp ==
== SampleApp ==

Latest revision as of 21:51, 20 October 2017

Engineering Portal / Digital / DCR & DTVR / JW Player Plugin iOS

Nielsen App SDK Plugin for JW Player interacts with Nielsen App SDK to provide with necessary data for streaming measurement based on the SDK events received from the JW Player SDK.

OS Player Version SDK Version Supported Ad Frameworks Download
{{{alt}}}
iOS
2.1 5.1.0.5 VMAP and VAST Download

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 JW Player: The download link for the Plugin Packages are provided with the Nielsen appid(s).
  • JWPlayer SDK for iOS
  • Test Environment Validation: Before moving the app into production, Nielsen must validate the Plugin's integration in a test environment.

Initial Configuration

Before integrating our Plugin, make sure to download the following:

  • Nielsen App SDK Plugin for JWPlayer, which includes:
    • Plugin Implementation Guide (this document)
    • The Nielsen App SDK Plugin for JWPlayer source code and
    • The sample application source code which supports JWPlayer VAST ad Plugin.

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 iOS SDK API Reference.

Setup

The steps for setting up the Nielsen App SDK Plugin for JWPlayer are as follows

Nielsen App SDK Plugin Package Installation

For FreeWheel ad support

  • Unzip the NielsenJWPlayerPluginForiOS.zip
  • Copy "NielsenAppApi.Framework" to the NielsenJWPlayerPluginForiOS/NielsenSampleAppVast folder.
  • Download JWPlayer SDK from https://dashboard.jwplayer.com/#/players/downloads. The plugin has been tested with version 2.1.0.
  • Copy "JWPlayer-iOS-SDK.framework" to the "NielsenJWPlayerPluginForiOS/NielsenSampleAppVast" folder
  • Drag and drop "NielsenAppApi.Framework" and "JWPlayer-iOS-SDK.framework" to NielsenSampleAppVast project. Make sure frameworks are linked under Build Phases → Link Binary with Libraries
  • click '+' sign and add "NielsenAppApi.Framework" and "JWPlayer-iOS-SDK.framework"
  • Build the app within the plugin

Nielsen App SDK Plugin Creation

The Nielsen App SDK Plugin for JWPlayer integrates with the JWPlayer 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 JWPlayer SDK when it is instantiated by the application.

Perform the following steps in the app view controller, where the player is initialized

  • Import Plugin
    #import "NielsenJWPlayerPlugin.h"
    
  • Add Property
    @property (nonatomic, strong) NielsenJWPlayerPlugin *nielsenJWPlayerPlugin;
    
  • Instantiate the plugin and register it with an instance of 'JWPlayerController' based on the app information provided by Nielsen.
self.nielsenJWPlayerPlugin = [[NielsenJWPlayerPlugin alloc]
initWithPlayer: player appInfo:@
{
    @"appid": @"MY_APP_ID",
    @"appversion": @"MY_APP_VERSION",
    @"appname": @"MY_APP_NAME",
    @"sfcode": @"MY_SFCODE"
};
self.nielsenJWPlayerPlugin.dataSource = self;
self.player.delegate = self.nielsenJWPlayerPlugin;
  • Implement 'NielsenJWPlayerDataSource' delegate by adding the method as mentioned below:
 (NSDictionary *)contentMetadata;

Plugin will call this method to fetch content metadata for the video.

Refer to the Reference Guide in the Nielsen SDK Documentation 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 *)channelInfo;

Plugin calls this method to request for channel information associated with the video.

Refer to the Digital Measurement Onboarding in the Nielsen SDK Documentation on the exact format of this dictionary.

  • Add the following line of code to notify App SDK that the remote OTT device (like Google ChromeCast, Roku, Amazon FireTV, etc.) is connected / disconnected (change of OTT status).

Refer to the Digital Measurement Onboarding in the Nielsen SDK Documentation for more information and example.

Opt-Out

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;;

This API gets the current Nielsen opt-out state of AppSDK. Call this API to retrieve the Opt-Out or Opt-In state. Refer to the Digital Measurement Onboarding in the Nielsen SDK Documentation for more information and example.

  • For App SDK 5.1.1.17 and above, the opt-out page can be displayed in a WebView / external browser using the optOutURL exposed by the plugin.
  • For App SDK 5.1.1.16 and earlier, display the opt-out page in a WebView using the optOutURL exposed by the plugin and pass the response from user back to Nielsen using the userOptOut. For more details, refer to iOS SDK API Reference#iOS Opt-Out Implementation.

SampleApp

Check NielsenJWPlayerSampleApp (NielsenJWPlayerSampleApp.tar.gz) to know about the usage of plugin and the Opt-Out page.

Releases

Name Version # Date Comments
Nielsen AppSDK Plugin for JWPLayer (VAST) 1.0.0 03/02/2016 Initial version of the Nielsen App SDK Plugin for JWPlayer (iOS) with support for VAST ads.
Nielsen AppSDK Plugin for JWPLayer (VAST) 1.1.0 06/20/2016 Reflects changes as per latest Nielsen App SDK v5.1.0.5
Nielsen AppSDK Plugin for JWPLayer (VAST) 1.2.0 07/27/2016 Reflects changes as per latest Nielsen App SDK v5.1.1.19