FLAdvertisingGoogleIMAFactory

public enum FLAdvertisingGoogleIMAFactory

Google IMA Advertising Factory.

  • 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) -> GoogleIMAAdRequest

    Parameters

    adTagUrl

    The end point to request ads.

    adOverlayUIScope

    The array of AdOverlayUIScope that contains the friendly obstraction views.

    loadMediaTimeout

    Loading a video ad media file timeout in seconds. The default is 8 seconds.

    languageTag

    Can 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-codes

    imaUiElementOption

    Specify the UI elements that should remain visible during ad playback

    disableNowPlayInfo

    Specifies whether to update the MPNowPlayingInfoCenter content with the title “Advertisement”. If disabled, MPNowPlayingInfoCenter is untouched. The default value is NO.

    playAdsAfterTime

    For VMAP and ad rules playlists, only play ad breaks scheduled after this time (in seconds). This setting is strictly after the specified time.

    palConfiguration

    PAL session configuration for programmatic access.

  • 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) -> GoogleIMAAdRequest

    Parameters

    contentSourceID

    The stream request content source ID. This is used to determine the content source of the stream.

    videoID

    The stream request video ID. This is used to determine which specific video stream should be played.

    adOverlayUIScope

    The array of AdOverlayUIScope that contains the friendly obstraction views.

    loadMediaTimeout

    Loading a video ad media file timeout in seconds. The default is 8 seconds.

    languageTag

    Can 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-codes

    adPlaybackPolicy

    Customize your ad play back

    adTagParameters

    Supply targeting parameters to your stream

    imaUiElementOption

    Specify the UI elements that should remain visible during ad playback

  • 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) -> GoogleIMAAdRequest

    Parameters

    assetKey

    Identifier of the Live stream. This is used to determine which stream should be played.

    adOverlayUIScope

    The array of AdOverlayUIScope that contains the friendly obstraction views.

    loadMediaTimeout

    Loading a video ad media file timeout in seconds. The default is 8 seconds.

    languageTag

    Can 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-codes

    adTagParameters

    Supply targeting parameters to your stream

    imaUiElementOption

    Specify the UI elements that should remain visible during ad playback

  • Please note that this AdPlayer should not be used directly. It has to be used via ComposableAdPlayer for 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) -> GoogleIMAAdPlayer

    Parameters

    contentPlayer

    The main content player.

    request

    The Google IMA ad request of type GoogleIMAAdRequest such as GoogleCSAIRequest, GoogleDAIVODRequest, GoogleDAILIVERequest.

    playerViewController

    The viewcontroler object. This should be the parent of playback view.

    shouldSupportPIP

    To tell the player can play PIP or not. The default value is false.

  • Please note that this AdPlayer should not be used directly. It has to be used via ComposableAdPlayer for it to work seamlessly.

    Declaration

    Swift

    public static func adPlayer(contentPlayer: Player,
                                request: GoogleIMAAdRequest,
                                shouldSupportPIP: Bool = false,
                                playerViewControllerCallback: @escaping () -> UIViewController) -> GoogleIMAAdPlayer

    Parameters

    contentPlayer

    The main content player.

    request

    The Google IMA ad request of type GoogleIMAAdRequest such as GoogleCSAIRequest, GoogleDAIVODRequest, GoogleDAILIVERequest.

    playerViewControllerCallback

    Accepting player viewcontroller (where the playback view attached) lasyly when that is needed. Requred to return the UiViewControler which is used for the playback.

    shouldSupportPIP

    To 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) -> AdComposablePlayer

    Parameters

    contentPlayer

    The main content player.

    adPlayer

    Ad player.