AVPlayer with Google DAI SDK ( Framework )
This guide provides detailed instructions on integrating the MediaMelon Player SDK into an iOS Media Player Application that supports Google Dynamic Ad Insertion
Step 0: Creating AVPlayer based media player application
Create a directory for integration by doing the following. Open the terminal, change directory to the home directory, and create a folder sampleintegration
cd ~/
mkdir sampleintegration
cd sampleintegration/Pull the Sample Application from the link available in the Release Notes
Get the sample app dependencies by changing the directory to the ~/sampleintegration/AVPlayerWithGoogleIMA and execute the following commands
Step 1: Setting up the Sample Application Environment
Execute the following two commands on the terminal in the folder ~/sampleintegration/AVPlayerWithGoogleIMA
sudo gem install cocoapods
pod init
touch PodfileStep 2: Integrating the MMAVPlayerWithGoogleDAI Framework
There are four steps involved for integrating the MediaMelon Player SDK using the MMAVPlayerWithGoogleDAI Framework:
Importing the framework
Providing asset information for the content before starting the player and after creating its instance
Cleaning up the SDK integration session
Disable manifest fetching by the SDK
Open the project file ~/sampleintegration/AVPlayerWithGoogleIMA/AVPlayerWithGoogleIMA.workspace in XCode and edit the file ViewController.swiftas mentioned below
1. Import Frameworks
2. Provide Asset information
In case of Google DAI we use IMALiveStreamRequest or IMAVODStreamRequest to obtain a Live or VOD stream respectively. The internal URL provided to AV Player needs to be used in the configureMMSDKwithURLcall. This can be obtained as follows
3. Cleaning up the SDK Session
5. Disable manifest fetching by the SDK
If your workflow restricts the manifest to be accessible from both player and the MediaMelon Player SDK simultaneously, then, you can disable the fetch of manifest via disableManifestsFetch() in method _configureMMSDKwithURL()
7. Specifying App Name and App Version
App Name and App Version can be specified by using the following API
Last updated