Skip to content

Commit

Permalink
FEC-9936 Missing IMA DAI parameters added to config (#63)
Browse files Browse the repository at this point in the history
FEC-9936
Missing IMA DAI parameters added to config
  • Loading branch information
chausov authored Oct 20, 2022
1 parent 53bb159 commit 77323bd
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/IMADAIConfig.swift
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ import GoogleInteractiveMediaAds
}
@objc public var videoId: String? // Needed for VOD
@objc public var licenseUrl: String?
@objc public var adTagParams: [String: String]?
@objc public var streamActivityMonitorId: String?
@objc public var authToken: String?

// IMASettings
@objc public var ppid: String?
Expand Down
12 changes: 12 additions & 0 deletions Sources/IMADAIPlugin.swift
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,18 @@ import PlayKitUtils

request.apiKey = pluginConfig.apiKey

if let adTagParameters = pluginConfig.adTagParams {
request.adTagParameters.merge(adTagParameters) { _, new in new }
}

if let monitorID = pluginConfig.streamActivityMonitorId {
request.streamActivityMonitorID = monitorID
}

if let authToken = pluginConfig.authToken {
request.authToken = authToken
}

if IMADAIPlugin.adsLoader == nil || stateMachine.getState() == .adsRequestFailed || stateMachine.getState() == .adsRequestTimedOut {
createAdsLoader()
}
Expand Down

0 comments on commit 77323bd

Please sign in to comment.