Interactive Media Ads (IMA)
IMA SDKs simplify the process of incorporating multimedia advertisements into your web pages and applications. They can request ads from any VAST-compliant ad server and handle the playback of the ads within the app. By using the IMA client-side SDKs, you retain control of the content video playback while the SDK manages the ad playback. The ads are displayed in a separate video player that is overlaid on top of the app's content video player.
Plugin Name: ImaSdkPlugin
Plugin Config Name: ima
Clientside
Configuration
Attribute | Type | Required | Description |
---|---|---|---|
adTagUrl | string | false | Ad Tag URL of the advertisement. (VAST, VPAID, VMAP, SIMID) |
Swift
let imaConfig = IMAPluginConfiguration(config: ["client": ["adTagUrl": "Your ad tag URL"]],
playerViewController: self)
DAI Serverside
VOD Configuration
Attribute | Type | Required | Description |
---|---|---|---|
contentSourceId | string | Yes | Content Source ID |
videoId | string | Yes | Video ID |
Swift
let imaConfig = IMAPluginConfiguration(config: ["dai": ["vod": ["contentSourceId": "Your content soude ID",
"videoId": "Your video ID"]]],
playerViewController: self)
let playerConfig = AktaPlayerConfiguration(requiredPluginsConfigurations: [imaConfig],
playerView: self.playerView,
eventListener: self.eventListener)
self.player = try? AktaPlayerCreator.playerWith(configuration: playerConfig)
let aktaMedia = AktaMedia()
aktaMedia.loadType = .imaDai
self.player?.load(media: aktaMedia, completion: { [weak self] loaded, error in
if loaded {
self?.player?.play()
}
})
Live Configuration
Attribute | Type | Required | Description |
---|---|---|---|
assetKey | string | No | Asset Key |
Swift
let imaConfig = IMAPluginConfiguration(config: ["dai": ["live": ["assetKey": "Your asset key"]]],
playerViewController: self)
let playerConfig = AktaPlayerConfiguration(requiredPluginsConfigurations: [imaConfig],
playerView: self.playerView,
eventListener: self.eventListener)
self.player = try? AktaPlayerCreator.playerWith(configuration: playerConfig)
let aktaMedia = AktaMedia()
aktaMedia.loadType = .imaDai
self.player?.load(media: aktaMedia, completion: { [weak self] loaded, error in
if loaded {
self?.player?.play()
}
})
Pod Serving
Pod Serving Configuration
Attribute | Type | Required | Description |
---|---|---|---|
networkCode | string | Yes | Network Code |
customAssetKey | string | Yes | Custom Asset Key |
streamUrl | string | No | Stream URL |
Swift
let imaConfig = IMAPluginConfiguration(config: "dai": ["pod-serving": ["streamUrl": "Your stream URL",
"networkCode": "Your network code",
"customAssetKey": ""]]],
playerViewController: self)