Integrating 3rd Party Ad Plugins

Learn how to quickly create your own ad plugins for the Ooyala Player.

The Ooyala iOS Mobile SDK allows you to create an ad player and add it as a plugin to the Ooyala Player.
  1. To get started, create an ad plugin, which provides the player with information about the ads. To create the plugin, you must implement the OOAdPlugin interface: Start by modifying a copy of the OOSamplePlugin, and override the methods in the required interface.
  2. Now you can create an ad player that handles ad playback. To create the ad player, you must implement the OOLifeCycle and OOPlayerProtocol interfaces. Start by modifying a copy of the OOSampleAdPlayer, and override the methods in the required interfaces.
  3. The final step is to register the plugin with the Ooyala Player. To do this, invoke the registerPlugin method, passing a reference to your plugin object (for example, OOSampleAdPlugin), as shown in the following code:
    OOSamplePlugin *plugin = [[OOSamplePlugin alloc] initWithPlayer:self.ooyalaPlayerViewController.player];
    [self.ooyalaPlayerViewController.player registerPlugin:plugin];

    To view a complete example, see PluginPlayerViewController.