Advertisements

There are two ways to deliver advertising information to the Bradmax Media Player:

  1. using Advertisement object configuration.
  2. using FreeWheel object configuration.
  3. using Google IMA object configuration.

Examples:



Advertisement object configuration:

Data type: object

Configuration path: .advertisement

Variable nameTypeDescription
vmapstringString containing information about Video Multiple Ad Playlist (VMAP).
breaksarrayArray containing Advertisement Break objects.
vastLoopUrlstringAdvertisements URL to display in loop.
  • vmap

    Data type: string

    Configuration path: .advertisement.vmap

    Description: The IAB Video Multiple Ad Playlist (VMAP) specification is an XML template that video content owners can use to describe the structure for ad inventory insertion when they don’t control the video player or the content distribution outlet (after IAB VMAP guidelines).

    For more details about VMAP see IAB guidelines

    Possible values are:

    • URL pointing to valid VMAP xml file:
      {
          advertisement: { 
              vmap: 'https://example.com/vmap.xml'
          },
          dataProvider: { source: [{ url: "https://example.com/video.mp4" }] }
      }
      
    • VMAP valid xml string:
      {
          advertisement: {
              vmap: `<?xml version="1.0" encoding="UTF-8"?><vmap:VMAP xmlns:vmap="http://www.iab.net/vmap-1.0" version="1.0"><vmap:AdBreak breakId="1" breakType="linear" timeOffset="start"><vmap:AdSource allowMultipleAds="true" followRedirects="true" id="1">
      <vmap:VASTAdData><VAST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0" xsi:noNamespaceSchemaLocation="vast.xsd"><Ad id="example_1" sequence="1"><InLine><Creatives><Creative id="1"><Linear><Duration>00:00:05</Duration><MediaFiles><MediaFile delivery="streaming" bitrate="2237" width="1280" height="720" type="video/mp4"><![CDATA[https://example.com/preroll.mp4]]></MediaFile>
      </MediaFiles></Linear></Creative></Creatives><Extensions></Extensions></InLine></Ad></VAST></vmap:VASTAdData></vmap:AdSource></vmap:AdBreak></vmap:VMAP>`
          },
          dataProvider: { source: [{ url: "https://example.com/video.mp4" }] }
      }
      
    • URL encoded valid VMAP xml data:
      {
          advertisement: { 
              vmap: `%3C%3Fxml%20version%3D%221.0%22%20encoding%3D%22UTF-8%22%3F%3E%3Cvmap%3AVMAP%20xmlns%3Avmap%3D%22http%3A%2F%2Fwww.iab.net%2Fvmap-1.0%22%20version%3D%221.0%22%3E%3Cvmap%3AAdBreak%20breakId%3D%221%22%20breakType%3D%22linear%22%20timeOffset%3D%22start%22%3E%3Cvmap%3AAdSource%20allowMultipleAds%3D%22true%22%20followRedirects%3D%22true%22%20id%3D%221%22%3E%0A%3Cvmap%3AVASTAdData%3E%3CVAST%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22%20version%3D%223.0%22%20xsi%3AnoNamespaceSchemaLocation%3D%22vast.xsd%22%3E%3CAd%20id%3D%22example_1%22%20sequence%3D%221%22%3E%3CInLine%3E%3CCreatives%3E%3CCreative%20id%3D%221%22%3E%3CLinear%3E%3CDuration%3E00%3A00%3A05%3C%2FDuration%3E%3CMediaFiles%3E%3CMediaFile%20delivery%3D%22streaming%22%20bitrate%3D%222237%22%20width%3D%221280%22%20height%3D%22720%22%20type%3D%22video%2Fmp4%22%3E%3C!%5BCDATA%5Bhttp%3A%2F%2Fexample.com%2Fpreroll_1of2.mp4%5D%5D%3E%3C%2FMediaFile%3E%0A%3C%2FMediaFiles%3E%3C%2FLinear%3E%3C%2FCreative%3E%3C%2FCreatives%3E%3CExtensions%3E%3C%2FExtensions%3E%3C%2FInLine%3E%3C%2FAd%3E%3C%2FVAST%3E%3C%2Fvmap%3AVASTAdData%3E%3C%2Fvmap%3AAdSource%3E%3C%2Fvmap%3AAdBreak%3E%3C%2Fvmap%3AVMAP%3E%0A`
          },
          dataProvider: { source: [{ url: "https://example.com/video.mp4" }] }
      }
      
  • vastLoopUrl

    Data type: string

    Configuration path: .advertisement.vastLoopUrl

    Description: This option is for continuous ads presentation without any other content (only ads).
    String containing link to VAST xml file with ads.
    Ads from this file are displayed in loop.

    Advertisement configuration for continious ads presentation (VAST ads loop):
    {
        advertisement: {
            vastLoopUrl: "https://example.com/vast.xml"
        }
    }
    
  • breaks

    Data type: array

    Configuration path: .advertisement.breaks

    Description: Array containing Advertisement Break objects.



Advertisement Break object:

Variable nameTypeDescription
timeOffsetstring[required] Advertisement playback time.
vaststringString containing information about Video Ad Serving Template (VAST).
adarrayArray of Advertisement Break Ad objects.
  • break.timeOffset

    Data type: string

    Configuration path: .advertisement.breaks[].timeOffset

    Description: [required] Advertisement playback time (in HH:MM:SS or HH:MM:SS.mmm format).

    For more details see VMAP documentation

  • break.vast

    Data type: string

    Configuration path: .advertisement.breaks[].vast

    Description: VAST is a Video Ad Serving Template for structuring ad tags that serve ads to video players (after IAB VAST guidelines).

    For more details about VAST see IAB VAST v3 specification

    Possible values are:

    • URL pointing to valid VAST xml file:
      {
          advertisement: { 
              breaks: [
                  {
                      timeOffset: '00:00:00',
                      vast: 'https://example.com/vast.xml'
                  }
              ]
          },
          dataProvider: { source: [{ url: "https://example.com/video.mp4" }] }
      }
      
    • VAST valid xml string:
      {
          advertisement: { 
              breaks: [
                  {
                      timeOffset: '00:00:00',
                      vast: `<VAST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="3.0" xsi:noNamespaceSchemaLocation="vast.xsd"><Ad id="bradmax_1" sequence="1"><InLine><Creatives><Creative id="1"><Linear><Duration>00:00:05</Duration><MediaFiles><MediaFile delivery="streaming" bitrate="2237" width="1280" height="720" type="video/mp4"><![CDATA[https://example.com/preroll.mp4]]></MediaFile></MediaFiles></Linear></Creative></Creatives><Extensions></Extensions></InLine></Ad></VAST>`
                  }
              ]
          },
          dataProvider: { source: [{ url: "https://example.com/video.mp4" }] }
      }
      
    • URL encoded VAST xml data.
      {
          advertisement: { 
              breaks: [
                  {
                      timeOffset: '00:00:00',
                      vast: '%3CVAST%20xmlns%3Axsi%3D%22http%3A%2F%2Fwww.w3.org%2F2001%2FXMLSchema-instance%22%20version%3D%223.0%22%20xsi%3AnoNamespaceSchemaLocation%3D%22vast.xsd%22%3E%3CAd%20id%3D%22example_1%22%20sequence%3D%221%22%3E%3CInLine%3E%3CCreatives%3E%3CCreative%20id%3D%221%22%3E%3CLinear%3E%3CDuration%3E00%3A00%3A05%3C%2FDuration%3E%3CMediaFiles%3E%3CMediaFile%20delivery%3D%22streaming%22%20bitrate%3D%222237%22%20width%3D%221280%22%20height%3D%22720%22%20type%3D%22video%2Fmp4%22%3E%3C!%5BCDATA%5Bhttp%3A%2F%example.com%2Fpreroll_1of2.mp4%5D%5D%3E%3C%2FMediaFile%3E%0A%3C%2FMediaFiles%3E%3C%2FLinear%3E%3C%2FCreative%3E%3C%2FCreatives%3E%3CExtensions%3E%3C%2FExtensions%3E%3C%2FInLine%3E%3C%2FAd%3E%3C%2FVAST%3E'
                  }
              ]
          },
          dataProvider: { source: [{ url: "https://example.com/video.mp4" }] }
      }
      
  • break.ad

    Data type: array

    Configuration path: .advertisement.breaks[].ad

    Description: Array of Advertisement Break Ad objects.



Advertisement Break Ad object:

Variable nameTypeDescription
durationstring[required] Advertisement playback duration
mediaarray[required] Array of Advertisement Break Ad Media objects.
  • break.ad.duration

    Data type: string

    Configuration path: .advertisement.breaks[].ad[].duration

    Description: [required] Description of advertisement playback duration (in HH:MM:SS or HH:MM:SS.mmm format).

    For more details see VAST documentation.

  • break.ad.media

    Data type: array

    Configuration path: .advertisement.breaks[].ad[].media

    Description: Array of media objects.

    for more details see Advertisement Break Ad Media object.



Advertisement Break Ad Media object:

Variable nameTypeDescription
urlstring[required] Url pointing to advertisement media file.
apiFrameworkstringIdentifies the API needed to execute an interactive media file.
deliverystringEither “progressive” for progressive download protocols (such as HTTP) or “streaming” for streaming protocols.
bitratestringFor progressive load video, the bitrate value specifies the average bitrate for the media file.
widthstringNative width of the video file, in pixels.
heightstringNative height of the video file, in pixels.
typestringMIME type for the file container. Popular MIME types include, but are not limited to “video/xflv” for Flash Video and “video/mp4” for MP4.
  • break.ad.media.url

    Data type: string

    Configuration path: .advertisement.breaks[].ad[].media.url

    Description: Url pointing to advertisement media file.

  • break.ad.media.apiFramework

    Data type: string

    Configuration path: .advertisement.breaks[].ad[].media.apiFramework

    Description: Identifies the API needed to execute an interactive media file.

  • break.ad.media.delivery

    Data type: string

    Configuration path: .advertisement.breaks[].ad[].media.delivery

    Description: Either “progressive” for progressive download protocols (such as HTTP) or “streaming” for streaming protocols.

  • break.ad.media.bitrate

    Data type: string

    Configuration path: .advertisement.breaks[].ad[].media.bitrate

    Description: For progressive load video, the bitrate value specifies the average bitrate for the media file.

  • break.ad.media.width

    Data type: string

    Configuration path: .advertisement.breaks[].ad[].media.width

    Description: Native width of the video file, in pixels.

  • break.ad.media.height

    Data type: string

    Configuration path: .advertisement.breaks[].ad[].media.height

    Description: Native height of the video file, in pixels.

  • break.ad.media.type

    Data type: string

    Configuration path: .advertisement.breaks[].ad[].media.type

    Description: MIME type for the file container. Popular MIME types include, but are not limited to “video/xflv” for Flash Video and “video/mp4” for MP4.

Examples of Advertisement Break Ad Media objects:

  • configuration with mp4 media
    {
        advertisement: { 
            breaks: [
                {
                    timeOffset: '00:00:00',
                    ad: {
                        duration: "00:00:05",
                        media: [
                            {
                                delivery: "streaming",
                                bitrate: "256",
                                width: "650",
                                height: "650",
                                type: "video/mp4",
                                url: "https://example.com/preroll.mp4"
                            }
                        ]
                    }
                }
            ]
        },
        dataProvider: { source: [{ url: "https://example.com/video.mp4" }] }
    }
    
  • configuration with vpaid media
    {
        advertisement: { 
            breaks: [
                {
                    timeOffset: '00:00:05',
                    ad: {
                        duration: "00:00:15",
                        media: [
                            {
                                apiFramework: "VPAID",
                                delivery: "progressive",
                                bitrate: "256",
                                width: "16",
                                height: "9",
                                type: "application/javascript",
                                url: "http://static.innovid.com/mobileapps/js/vpaid/1h41kg?cb=0ef1c87f-3745-1b3f-7978-b942737337c7&deviceid=&ivc=[ecp]"
                            }
                        ]
                    }
                }
            ]
        },
        dataProvider: { source: [{ url: "https://example.com/video.mp4" }] }
    }
    



FreeWheel object configuration:

Variable nameTypeDescription
debugboolEnable debug option.
testFeedstringUrl to VMAP/VAST file.
testFeedUrlstringSame as above.
customerIdstringFreeWheel customer id.
globalParamsstringFreeWheel configuration parameters.
profstringFreeWheel profile name.
keyValuesstringFreeWheel key values.
paramsForSlot[index]stringFreeWheel params for slot.
  • debug

    Data type: boolean

    Configuration path: .freewheel.debug

    Description: Enable/disable debug option in Bradmax FreeWheel plugin.

  • testFeed

    Data type: string

    Configuration path: .freewheel.testFeed

    Description: Url pointing to valid vast/vmap xml file.

  • testFeedUrl

    Data type: string

    Configuration path: .freewheel.testFeedUrl

    Description: Url pointing to valid vast/vmap xml file.

  • customerId

    Data type: string

    Configuration path: .freewheel.customerId

    Description: Unique FreeWheel customer id.

  • globalParams

    Data type: string

    Configuration path: .freewheel.globalParams

    Description: FreeWheel configuration parameters in form of URL query string.

  • prof

    Data type: string

    Configuration path: .freewheel.prof

    Description: FreeWheel profile name.

  • keyValues

    Data type: string

    Configuration path: .freewheel.keyValues

    Description: FreeWheel key values in form of URL query string.

  • paramsForSlot[index]

    Data type: string

    Configuration path: .freewheel.paramsForSlot[index]

    Description: FreeWheel params for slot in form of URL query string.

Player configuration example with freewheel settings:

{
    freewheel: { 
        debug: true,

        testFeed: 'https://example.com/vmap.xml',
        /* or */
        testFeedUrl: 'https://example.com/vmap.xml',

        /* if testFeed or testFeedUrl are unavailable then */

        customerId: "0000",

        globalParams: "key1=value1&key2=value2",

        prof: "00000:TEST_Bradmax_HTML5_Live",

        keyValues: "key1=value1&key2=value2",

        paramsForSlot1: "key1=value1&key2=value2",
        paramsForSlot2: "key1=value1&key2=value2",
        paramsForSlot3: "key1=value1&key2=value2",
        paramsForSlot4: "key1=value1&key2=value2",

    }
}



Google IMA object configuration:

Variable nameTypeDescription
requestobjectGoogle IMA request configuration object.
sdkobjectGoogle IMA sdk configuration object (optional).
renderingobjectGoogle IMA rendering configuration object (optional).
uiobjectGoogle IMA user interface configuration object (optional).


Google IMA request object:

Variable nameTypeDescription
adTagUrlstringSpecifies the ad tag url that is requested from the ad server (optional).
adsResponsestringSpecifies a VAST 2.0 document to be used as the ads response instead of making a request via an ad tag url (optional).
contentDurationnumberSpecifies the duration of the content in seconds to be shown (optional).
contentKeywordsarraySpecifies the keywords used to describe the content to be shown (optional).
contentTitlestringSpecifies the title of the content to be shown. Used in AdX requests (optional).
forceNonLinearFullSlotboolForces non-linear AdSense ads to render as linear fullslot (optional).
linearAdSlotWidthnumberSpecifies the width of the rectangular area within which a linear ad is displayed (optional).
linearAdSlotHeightnumberSpecifies the height of the rectangular area within which a linear ad is displayed (optional).
liveStreamPrefetchSecondsnumberSpecifies the maximum amount of time to wait in seconds, after calling requestAds, before requesting the ad tag URL (optional).
nonLinearAdSlotWidthnumberSpecifies the width of the rectangular area within which a non linear ad is displayed (optional).
nonLinearAdSlotHeightnumberSpecifies the height of the rectangular area within which a non linear ad is displayed (optional).
omidAccessModeRulesobjectSettings object for mapping verification vendors to OMID Access Modes (optional).
pageUrlstringSpecifies the full url of the page that will be included in the Google ad request for targeting purposes (optional).
vastLoadTimeoutnumberOverride for default VAST load timeout in milliseconds for a single wrapper. The default timeout is 5000ms (optional).
  • request.adTagUrl

    Data type: string

    Configuration path: .ima.request.adTagUrl

    Description: Specifies the ad tag url that is requested from the ad server. For details on constructing the ad tag url, see Create a master video tag manually.

    NOTE: It is required if adsResponse is not provided.

  • request.adsResponse

    Data type: string

    Configuration path: .ima.request.adsResponse

    Description: Specifies a VAST 2.0 document to be used as the ads response instead of making a request via an ad tag url. This can be useful for debugging and other situations where a VAST response is already available.

    NOTE: It is required if adTagUrl is not provided.

  • request.contentDuration

    Data type: number

    Configuration path: .ima.request.contentDuration

    Description: Specifies the duration of the content in seconds to be shown. It is used in 2 cases: 1) AdX ad targeting and 2) deciding when to preload VMAP postroll (optional).

    NOTE: Bradmax player will fill in this information using the media duration metadata as the source. However, if provided, it will overwrite information retrieved from the media metadata.

  • request.contentKeywords

    Data type: array

    Configuration path: .ima.request.contentKeywords

    Description: Specifies the keywords used to describe the content to be shown. Used in AdX requests (optional).

    NOTE: Bradmax player will fill in this information using the media tags metadata as the source. However, if provided, it will overwrite information retrieved from the media metadata.

  • request.contentTitle

    Data type: string

    Configuration path: .ima.request.contentTitle

    Description: Specifies the title of the content to be shown. Used in AdX requests (optional).

    NOTE: Bradmax player will fill in this information using the media title metadata as the source. However, if provided, it will overwrite information retrieved from the media metadata.

  • request.forceNonLinearFullSlot

    Data type: boolean

    Configuration path: .ima.request.forceNonLinearFullSlot

    Description: Forces non-linear AdSense ads to render as linear fullslot. If set, the content video will be paused and the non-linear text or image ad will be rendered as fullslot. The content video will resume once the ad has been skipped or closed.

  • request.linearAdSlotWidth

    Data type: number

    Configuration path: .ima.request.linearAdSlotWidth

    Description: Specifies the width of the rectangular area within which a linear ad is displayed. This value is used as one of the criteria for ads selection. This value does not need to match actual ad’s width. If not provided player will get value from video container element.

    NOTE: Bradmax player will fill in this information using the player container element size as the source. However, if provided, it will overwrite information retrieved from the player.

  • request.linearAdSlotHeight

    Data type: number

    Configuration path: .ima.request.linearAdSlotHeight

    Description: Specifies the height of the rectangular area within which a linear ad is displayed. This value is used as one of the criteria for ads selection. This value does not need to match actual ad’s height. If not provided player will get value from video container element.

    NOTE: Bradmax player will fill in this information using the player container element size as the source. However, if provided, it will overwrite information retrieved from the player.

  • request.liveStreamPrefetchSeconds

    Data type: number

    Configuration path: .ima.request.liveStreamPrefetchSeconds

    Description: Specifies the maximum amount of time to wait in seconds, after calling requestAds, before requesting the ad tag URL. This can be used to stagger requests during a live-stream event, in order to mitigate spikes in the number of requests.

  • request.nonLinearAdSlotWidth

    Data type: number

    Configuration path: .ima.request.nonLinearAdSlotWidth

    Description: Specifies the width of the rectangular area within which a non linear ad is displayed. This value is used as one of the criteria for ads selection. This value does not need to match actual ad’s width. If not provided player will get value from video container element.

    NOTE: Bradmax player will fill in this information using the player container element size as the source. However, if provided, it will overwrite information retrieved from the player.

  • request.nonLinearAdSlotHeight

    Data type: number

    Configuration path: .ima.request.nonLinearAdSlotHeight

    Description: Specifies the height of the rectangular area within which a non linear ad is displayed. This value is used as one of the criteria for ads selection. This value does not need to match actual ad’s height. If not provided player will get value from video container element.

    NOTE: Bradmax player will fill in this information using 70% the player container element height as the source. However, if provided, it will overwrite information retrieved from the player.

  • request.omidAccessModeRules

    Data type: object

    Configuration path: .ima.request.omidAccessModeRules

    Description: Settings object for mapping verification vendors to OMID Access Modes.

    Keys must have one of the following ​string values (OmidVerificationVendor):

    `COMSCORE`,`DOUBLEVERIFY`,`GOOGLE`,`INTEGRAL_AD_SCIENCE`,`MEETRICS`,`MOAT`,`NIELSEN`,`PIXELATE` or `OTHER`,
    

    and the value must be one of the following strings (OmidAccessMode):

    `limited`,`domain`,`full`
    
    • limited - The verification script is sandboxed and cannot access the creative or publisher page, and cannot directly confirm what publisher domain it is on,
    • domain - The verification script is sandboxed and cannot access the creative or publisher page. However, the script is loaded in such a way that it can directly confirm what publisher domain it is on,
    • full - The verification script has direct access to the creative and the publisher page.

    Verification script URLs are internally matched against vendor provided regular expressions to resolve to an OmidVerificationVendor key. IMA then looks up the access mode for the given vendor using this object. For script URLs that don’t resolve to a known vendor, or if the resolved OmidVerificationVendor is not provided in this object, IMA will use the access mode provided for OmidVerificationVendor OTHER. If OmidVerificationVendor OTHER is not provided, then the limited access mode will be used.

  • request.pageUrl

    Data type: string

    Configuration path: .ima.request.pageUrl

    Description: Specifies the full url of the page that will be included in the Google ad request for targeting purposes. The url needs to be a valid url.

    NOTE: Bradmax player will fill in this information using window.location.href as the source. However, if provided, it will replace information retrieved from the browser API.

  • request.vastLoadTimeout

    Data type: number

    Configuration path: .ima.request.vastLoadTimeout

    Description: Override for default VAST load timeout in milliseconds for a single wrapper. The default timeout is 5000ms.



Google IMA sdk object:

Variable nameTypeDescription
autoPlayAdBreaksboolSets whether VMAP and ad rules ad breaks are automatically played (optional).
companionBackfillstringSets the companion backfill mode (optional).
cookiesEnabledboolWhether the SDK should store a Google Ad Manager cookie (GFP Cookie) on the publisher’s domain, as a first-party cookie (optional).
disableCustomPlaybackForIOS10PlusboolSets whether to disable custom playback on iOS 10+ browsers (optional).
featureFlagsobjectSet the value for any feature flags. This should be set as early as possible, before requesting ad (optional).
localestringSets the publisher provided locale (optional).
numRedirectsnumberSpecifies the maximum number of redirects before the subsequent redirects will be denied, and the ad load aborted (optional).
ppidstringSets the publisher provided id (optional).
sessionIdstringSession ID is a temporary random ID (optional).
vpaidModestringSets VPAID playback mode (optional).
  • sdk.autoPlayAdBreaks

    Data type: boolean

    Configuration path: .ima.sdk.autoPlayAdBreaks

    Description: Sets whether VMAP and ad rules ad breaks are automatically played.

    NOTE: Bradmax player will fill in this information using player autoplay configuration value the source. However, if provided, it will overwrite information retrieved from the player.

  • sdk.companionBackfill

    Data type: string

    Configuration path: .ima.sdk.companionBackfill

    Description: Sets the companion backfill mode. The default mode is always. Possible values are:

    `always` or `on_master_ad`
    
  • sdk.cookiesEnabled

    Data type: boolean

    Configuration path: .ima.sdk.cookiesEnabled

    Description: Whether the SDK should store a Google Ad Manager cookie (GFP Cookie) on the publisher’s domain, as a first-party cookie. This enables persistence across multiple visits to the same domain without using third-party cookies. Defaults to true. This setting will not affect other cookies which may be set by other parties or for other purposes. User consent and opt-outs may also disable usage of first-party cookies. These will be picked up by publisher’s usage of an IAB compliant Consent Management Provider, if in the same frame.

  • sdk.disableCustomPlaybackForIOS10Plus

    Data type: boolean

    Configuration path: .ima.sdk.disableCustomPlaybackForIOS10Plus

    Description: Sets whether to disable custom playback on iOS 10+ browsers. If true, ads will play inline if the content video is inline. This enables TrueView skippable ads. However, the ad will stay inline and not support iOS’s native fullscreen. When false, ads will play in the same player as your content. The default value is false.

  • sdk.featureFlags

    Data type: object

    Configuration path: .ima.sdk.featureFlags

    Description: Set the value for any feature flags.

  • sdk.locale

    Data type: string

    Configuration path: .ima.sdk.locale

    Description: Sets the publisher provided locale. Must be called before creating AdsLoader or AdDisplayContainer. The locale specifies the language in which to display UI elements. The supported codes can be found in https://developers.google.com/interactive-media-ads/docs/sdks/html5/localization.

    NOTE: Bradmax player will fill in this information using the player locale configuration as the source. However, if provided, it will overwrite information retrieved from the player configuration.

  • sdk.numRedirects

    Data type: number

    Configuration path: .ima.sdk.numRedirects

    Description: Specifies the maximum number of redirects before the subsequent redirects will be denied, and the ad load aborted. The number of redirects directly affects latency and thus user experience. This applies to all VAST wrapper ads.

  • sdk.ppid

    Data type: string

    Configuration path: .ima.sdk.ppid

    Description: Sets the publisher provided id.

  • sdk.sessionId

    Data type: string

    Configuration path: .ima.sdk.sessionId

    Description: Session ID is a temporary random ID. It is used exclusively for frequency capping. A session ID must be a UUID.

  • sdk.vpaidMode

    Data type: string

    Configuration path: .ima.sdk.vpaidMode

    Description: Sets VPAID playback mode. Possible string values are:

    `DISABLED`, `ENABLED`, `INSECURE`
    



Google IMA rendering object:

Variable nameTypeDescription
autoAlignboolSet to false if you wish to have fine grained control over the positioning of all non-linear ads (optional).
bitratenumberMaximum recommended bitrate (optional). The value is in kbit/s.
enablePreloadingboolEnables preloading of video assets (optional).
loadVideoTimeoutnumberTimeout (in milliseconds) when loading a video ad media file (optional).
mimeTypesarrayOnly supported for linear video mime types (optional).
playAdsAfterTimenumberFor VMAP and ad rules playlists, only play ad breaks scheduled after this time (in seconds) (optional).
restoreCustomPlaybackStateOnAdBreakCompleteboolSpecifies whether or not the SDK should restore the custom playback state after an ad break completes (optional).
uiElementsarraySpecifies whether the UI elements that should be displayed (optional).
useStyledLinearAdsboolRender linear ads with full UI styling (optional).
useStyledNonLinearAdsboolRender non-linear ads with a close and recall button (optional).
  • rendering.autoAlign

    Data type: boolean

    Configuration path: .ima.rendering.autoAlign

    Description: Set to false if you wish to have fine grained control over the positioning of all non-linear ads. If this value is true, the ad is positioned in the bottom center. If this value is false, the ad is positioned in the top left corner. The default value is true.

  • rendering.bitrate

    Data type: number

    Configuration path: .ima.rendering.bitrate

    Description: Maximum recommended bitrate. The value is in kbit/s. The SDK will pick media with bitrate below the specified max, or the closest bitrate if there is no media with lower bitrate found. Default value, -1, means the bitrate will be selected by the SDK.

  • rendering.enablePreloading

    Data type: boolean

    Configuration path: .ima.rendering.enablePreloading

    Description: Enables preloading of video assets. Default value true.

  • rendering.loadVideoTimeout

    Data type: number

    Configuration path: .ima.rendering.loadVideoTimeout

    Description: Timeout (in milliseconds) when loading a video ad media file. If loading takes longer than this timeout, the ad playback is canceled and the next ad in the pod plays, if available. Use -1 for the default of 8 seconds.

  • rendering.mimeTypes

    Data type: Array

    Configuration path: .ima.rendering.mimeTypes

    Description: Only supported for linear video mime types. If specified, the SDK will include media that matches the MIME type(s) specified in the list and exclude media that does not match the specified MIME type(s). The format is a list of strings, e.g., [ 'video/mp4’, 'video/webm’, … ] If not specified, the SDK will pick the media based on player capabilities.

  • rendering.playAdsAfterTime

    Data type: number

    Configuration path: .ima.rendering.playAdsAfterTime

    Description: For VMAP and ad rules playlists, only play ad breaks scheduled after this time (in seconds). This setting is strictly after - e.g. setting playAdsAfterTime to 15 will cause IMA to ignore an ad break scheduled to play at 15s.

  • rendering.restoreCustomPlaybackStateOnAdBreakComplete

    Data type: boolean

    Configuration path: .ima.rendering.restoreCustomPlaybackStateOnAdBreakComplete

    Description: Specifies whether or not the SDK should restore the custom playback state after an ad break completes. This is setting is used primarily when the publisher passes in its content player to use for custom ad playback. Default value true.

  • rendering.uiElements

    Data type: array

    Configuration path: .ima.rendering.uiElements

    Description: Specifies whether the UI elements that should be displayed. The elements in this array are ignored for AdSense/AdX ads. Possible values are:

    `ad_attribution` or `countdown`
    

    NOTE: If available and the Bradmax Ads UI is not disabled, some controls may be rendered twice.

  • rendering.useStyledLinearAds

    Data type: boolean

    Configuration path: .ima.rendering.useStyledLinearAds

    Description: Render linear ads with full UI styling. This setting does not apply to AdSense/AdX ads or ads played in a mobile context that already use full UI styling by default. Default value false.

  • rendering.useStyledNonLinearAds

    Data type: boolean

    Configuration path: .ima.rendering.useStyledNonLinearAds

    Description: Render non-linear ads with a close and recall button. Default value true.



Google IMA ui object:

Variable nameTypeDescription
disabledboolCompletely disables Bradmax advertising skin rendering (optional).
playButtonboolToggles the rendering of the play button in the Bradmax advertising skin (optional).
muteButtonboolToggles the rendering of the mute button in the Bradmax advertising skin (optional)
showAdLabelboolToggles the rendering of the ad label in the Bradmax advertising skin (optional)
showAdCounterboolToggles the rendering of the ads counter in the Bradmax advertising skin (optional)
showAdTimeboolToggles the rendering of the ad timer in the Bradmax advertising skin (optional)
  • ui.disabled

    Data type: boolean

    Configuration path: .ima.ui.disabled

    Description: Completely disables Bradmax advertising skin rendering. Default to false.

  • ui.playButton

    Data type: boolean

    Configuration path: .ima.ui.playButton

    Description: Toggles the rendering of the play button in the Bradmax advertising skin. Default to true.

  • ui.muteButton

    Data type: boolean

    Configuration path: .ima.ui.muteButton

    Description: Toggles the rendering of the mute button in the Bradmax advertising skin. Default to true.

  • ui.showAdLabel

    Data type: boolean

    Configuration path: .ima.ui.showAdLabel

    Description: Toggles the rendering of the ad label in the Bradmax advertising skin. Default to true.

  • ui.showAdCounter

    Data type: boolean

    Configuration path: .ima.ui.showAdCounter

    Description: Toggles the rendering of the ads counter in the Bradmax advertising skin. Default to true.

  • ui.showAdTime

    Data type: boolean

    Configuration path: .ima.ui.showAdTime

    Description: Toggles the rendering of the ad timer in the Bradmax advertising skin. Default to true.

Player configuration example with minimal googleima settings:

{
    ima: { 
        request: { 
            adTagUrl: `valid url to IMA tag`
        }
    }
}

Examples of URLs to IMA tags can be found at Google IMA page

Player configuration example with all googleima settings:

{
    ima: {
        request: { 
            adTagUrl: `valid url to IMA tag`,
            contentDuration: 360, // in seconds
            contentKeywords: ['test', 'ima'],
            contentTitle:  'IMA test',
            forceNonLinearFullSlot: false,
            linearAdSlotWidth: 300,
            linearAdSlotHeight: 200,
            liveStreamPrefetchSeconds: -1,
            nonLinearAdSlotWidth: 300,
            nonLinearAdSlotHeight: 150,
            omidAccessModeRules: {
                COMSCORE: 'limited',
                DOUBLEVERIFY: 'limited',
                GOOGLE: 'limited',
                INTEGRAL_AD_SCIENCE: 'limited',
                MEETRICS: 'limited',
                MOAT: 'limited',
                NIELSEN: 'limited',
                PIXELATE: 'limited',
                OTHER: 'domain',
            },
            pageUrl: 'https://bradmax.com/static/player-doc/advertisements.html#googleima-configuration',
            vastLoadTimeout: 500, // in millisecond
        },
        sdk: {
            autoPlayAdBreaks: true,
            companionBackfill: 'on_master_ad',
            cookiesEnabled: false,
            disableCustomPlaybackForIOS10Plus: false,
            featureFlags: {},
            locale: 'en',
            numRedirects: 3,
            ppid: 'test-publisher-provided-id',
            sessionId: 'test-session-id'
            vpaidMode: 'INSECURE',
        },
        rendering: {
            autoAlign: true,
            bitrate: 512,
            enablePreloading: true,
            loadVideoTimeout: -1, // in milliseconds
            mimeTypes: [ 'video/mp4', 'video/webm'],
            playAdsAfterTime: 0, // in seconds
            restoreCustomPlaybackStateOnAdBreakComplete: true,
            uiElements: [],
            useStyledLinearAds: false,
            useStyledNonLinearAds: true,
        },
        ui: {
            disabled: false,
            playButton: true,
            muteButton: true,
            showAdLabel: true,
            showAdCounter: true,
            showAdTime: true,
        },
    }
}