Advertisements

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

  1. using Advertisement object configuration.
  2. using FreeWheel 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
debugbooleanEnable 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",

    }
}