Ooyala Player v4 Pulse Integration for iOS Documentation

The Ooyala Pulse Integration framework for iOS allows you to display ads served from Ooyala Pulse along with your video content in the Ooyala Player for iOS.

The OOPulseManager class provides the support for displaying Ooyala Pulse ads to your OOOoyalaPlayer.

Prerequisites

Getting Started

  1. Import the Ooyala Pulse Integration framework:
    1 @import <OoyalaPulseIntegration/OoyalaPulseIntegration.h>
  2. Create an OOPulseManager object and associate it with your OOOoyalaPlayer:
    1 self.manager = [[OOPulseManager alloc] initWithPlayer:self.player];
    2 self.manager.delegate = self;
  3. Optionally, set any ad player options through the OOPulsePlayerOptions object on the OOPulseManager. Possible options are:
    • displayingAdTitle: Boolean indicating whether to show the ad title during the ad playback or not. Default value is false, and indicates to not show the ad title.

      ``` OOPulsePlayerOptions * pulsePlayerOptions = [[OOPulsePlayerOptions alloc] init]; self.manager.pulsePlayerOptions.displayingAdTitle = true; ```

  4. Implement the OOPulseManagerDelegate method pulseManager:createSessionForVideo:withPulseHost:contentMetadata:requestSettings: in your delegate. Initial values for all parameters in this method are automatically taken from settings in your Backlot account, but if needed, you may modify the host location of your Ooyala Pulse account, persistent ID, content metadata, request settings and so on, before creating the session. For more information about these parameters, refer to Ooyala Video Advertising SDK Parameter Reference.
1 - (id<OOPulseSession>)pulseManager:(OOPulseManager *)manager
2  createSessionForVideo:(OOVideo *)video
3  withPulseHost:(NSString *)pulseHost
4  contentMetadata:(VPContentMetadata *)contentMetadata
5  requestSettings:(VPRequestSettings *)requestSettings
6 {
7  // Set the correct pulse host and options
8  [OOPulse setPulseHost:pulsehost
9  deviceContainer:nil
10  persistentId:nil];
11 
12  // Here we assume a landscape orientation for video playback
13  requestSettings.width = (NSInteger)MAX(self.view.frame.size.width, self.view.frame.size.height);
14  requestSettings.height = (NSInteger)MIN(self.view.frame.size.width, self.view.frame.size.height);
15 
16  // Implement a way of determining the max
17  // bitrate of ads to request.
18  requestSettings.maxBitRate = [BandwidthChecker maxBitRate];
19 
20  return [OOPulse sessionWithContentMetadata:contentMetadata
21  requestSettings:requestSettings];
22 }

Sample Application

The sample integration is coded in OBJ-C and is found here