FLAdvertisingGoogleIMAFactory
public enum FLAdvertisingGoogleIMAFactory
Google IMA Advertising Factory.
-
adRequest(adTagUrl:adOverlayUIScope: loadMediaTimeout: languageTag: imaUiElementOption: disableNowPlayInfo: playAdsAfterTime: palConfiguration: ) API to create a IMA CSAI Ad request.
Declaration
Swift
public static func adRequest(adTagUrl: String, adOverlayUIScope: [AdOverlayUIScope]? = nil, loadMediaTimeout: TimeInterval? = nil, languageTag: String? = nil, imaUiElementOption: IMAUiElementOption = .AD_ATTRIBUTION_AND_COUNTDOWN, disableNowPlayInfo: Bool = false, playAdsAfterTime: TimeInterval? = nil, palConfiguration: PALSessionConfiguration? = nil) -> GoogleIMAAdRequestParameters
adTagUrlThe end point to request ads.
adOverlayUIScopeThe array of
AdOverlayUIScopethat contains the friendly obstraction views.loadMediaTimeoutLoading a video ad media file timeout in seconds. The default is 8 seconds.
languageTagCan choose to use same application language. Note: Country code value need to provide here For example English
en. Google DAI reference for the possible language codes. https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/localization?service=full#locale-codesimaUiElementOptionSpecify the UI elements that should remain visible during ad playback
disableNowPlayInfoSpecifies whether to update the MPNowPlayingInfoCenter content with the title “Advertisement”. If disabled, MPNowPlayingInfoCenter is untouched. The default value is NO.
playAdsAfterTimeFor VMAP and ad rules playlists, only play ad breaks scheduled after this time (in seconds). This setting is strictly after the specified time.
palConfigurationPAL session configuration for programmatic access.
-
adRequest(contentSourceID:videoID: adOverlayUIScope: loadMediaTimeout: languageTag: adPlaybackPolicy: adTagParameters: imaUiElementOption: ) API to create a IMA SSAI Ad request for VOD.
Declaration
Swift
public static func adRequest(contentSourceID: String, videoID: String, adOverlayUIScope: [AdOverlayUIScope]? = nil, loadMediaTimeout: TimeInterval? = nil, languageTag: String? = nil, adPlaybackPolicy: AdPlaybackPolicy? = nil, adTagParameters: [String: String]? = nil, imaUiElementOption: IMAUiElementOption = .AD_ATTRIBUTION_AND_COUNTDOWN) -> GoogleIMAAdRequestParameters
contentSourceIDThe stream request content source ID. This is used to determine the content source of the stream.
videoIDThe stream request video ID. This is used to determine which specific video stream should be played.
adOverlayUIScopeThe array of
AdOverlayUIScopethat contains the friendly obstraction views.loadMediaTimeoutLoading a video ad media file timeout in seconds. The default is 8 seconds.
languageTagCan choose to use same application language. Note: Country code value need to provide here For example English
en. Google DAI reference for the possible language codes. https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/localization?service=full#locale-codesadPlaybackPolicyCustomize your ad play back
adTagParametersSupply targeting parameters to your stream
imaUiElementOptionSpecify the UI elements that should remain visible during ad playback
-
adRequest(assetKey:adOverlayUIScope: loadMediaTimeout: languageTag: adTagParameters: imaUiElementOption: ) API to create a IMA SSAI Ad request for LIVE.
Declaration
Swift
public static func adRequest(assetKey: String, adOverlayUIScope: [AdOverlayUIScope]? = nil, loadMediaTimeout: TimeInterval? = nil, languageTag: String? = nil, adTagParameters: [String: String]? = nil, imaUiElementOption: IMAUiElementOption = .AD_ATTRIBUTION_AND_COUNTDOWN) -> GoogleIMAAdRequestParameters
assetKeyIdentifier of the Live stream. This is used to determine which stream should be played.
adOverlayUIScopeThe array of
AdOverlayUIScopethat contains the friendly obstraction views.loadMediaTimeoutLoading a video ad media file timeout in seconds. The default is 8 seconds.
languageTagCan choose to use same application language. Note: Country code value need to provide here For example English
en. Google DAI reference for the possible language codes. https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/localization?service=full#locale-codesadTagParametersSupply targeting parameters to your stream
imaUiElementOptionSpecify the UI elements that should remain visible during ad playback
-
Please note that this
AdPlayershould not be used directly. It has to be used viaComposableAdPlayerfor it to work seamlessly.Declaration
Swift
@available(*, deprecated, message: "This API has been deprecated. Please use `adPlayer(contentPlayer: request: shouldSupportPIP: playerViewController:﹚` instead.") public static func adPlayer(contentPlayer: Player, request: GoogleIMAAdRequest, playerViewController: UIViewController, shouldSupportPIP: Bool = false) -> GoogleIMAAdPlayerParameters
contentPlayerThe main content player.
requestThe Google IMA ad request of type
GoogleIMAAdRequestsuch asGoogleCSAIRequest,GoogleDAIVODRequest,GoogleDAILIVERequest.playerViewControllerThe viewcontroler object. This should be the parent of playback view.
shouldSupportPIPTo tell the player can play PIP or not. The default value is false.
-
Please note that this
AdPlayershould not be used directly. It has to be used viaComposableAdPlayerfor it to work seamlessly.Declaration
Swift
public static func adPlayer(contentPlayer: Player, request: GoogleIMAAdRequest, shouldSupportPIP: Bool = false, playerViewControllerCallback: @escaping () -> UIViewController) -> GoogleIMAAdPlayerParameters
contentPlayerThe main content player.
requestThe Google IMA ad request of type
GoogleIMAAdRequestsuch asGoogleCSAIRequest,GoogleDAIVODRequest,GoogleDAILIVERequest.playerViewControllerCallbackAccepting player viewcontroller (where the playback view attached) lasyly when that is needed. Requred to return the UiViewControler which is used for the playback.
shouldSupportPIPTo tell the player can play PIP or not. The default value is false.
-
API to create a composable ad player.
Declaration
Swift
public static func adComposablePlayer(contentPlayer: Player, adPlayer: GoogleIMAAdPlayer) -> AdComposablePlayerParameters
contentPlayerThe main content player.
adPlayerAd player.