Advertising


🚧

Since any changes made to the advertising object override any advertising settings made in the dashboard, be sure to include all existing advertising dashboard configurations within the advertising object.


This object configures the video advertising capabilities of JW Player and overrides advertising settings configured in the dashboard. If no schedule is specified, the ad will play as a preroll by default.

PropertyDescriptionClientDefault
client* string
                                                                     
(Required) Chooses the ad client that will be used to display advertisements.

Possible values include:

• dai: Use the Google IMA SDK for dynamic ad insertion

• freewheel: Use the Freewheel client

• googima: Use the Google IMA SDK - Required for certain ad tags

• vast: Use the JW Player VAST client
All-
outstream* 8.6.0+ boolean(Required for outstream only) Property enabling outstream functionality

NOTE: This must be set to true to enable outstream functionality.
All-
adTagParameters < 8.18.3+ objectAdd custom parameter key value pairsDAI-
adscheduleid string(Recommended) Unique identifier for an ad (break) schedule. This ID is located on the ADVANCED tab of the Ad Schedule Detail page. If you do not have ad schedules created via the dashboard, a randomly-generated, eight character, alpha-numeric value can be set.All-
admessage < 8.6.0 stringText that displays during ad playback.

WARNING: Starting with JW Player 8.6.0, use the intl object to set this property.
AllThe ad will end in xx seconds
allowedOmidVendors < 8.20.0+ arrayIf not set or set as an empty array, all vendors can run. If set, only the resources from the listed vendors can run. All failures to run verification will be noted accordingly to the ad server.VAST-
autoplayadsmuted booleanFor inline players that start muted when viewed on mobile devices, allows ads to play mutedAll-
bids objectEnable Player Bidding with the given settings and bidders. See: advertising.bidsIMA, VAST-
clearAdsOnComplete objectDetermines whether an ad schedule block will be cleared during media replay or seek

Possible values:

• true: Clears an ad schedule block so that when a replay or seek occurs, ads won't be shown

• false: Maintains an ad schedule block when a replay or seek occurs
Allfalse
companiondiv objectGives information to the player related to which div(s) to populate with companion ads. See: advertising.companiondivIMA, VAST-
conditionaladoptout boolean(VPAID-only) Used to tell the player to not play ads with the conditionalAd attribute inside of the VAST responseVASTfalse
creativeTimeout numberIn milliseconds, the maximum amount of time between the VAST XML being returned and the adStart event before timing outVAST15000
cuetext < 8.6.0 stringSpecify the text that appears when a user mouses over a scheduled advertisement.

WARNING: Starting with JW Player 8.6.0, use the intl object to set this property.
AllAdvertisement
duration numberFreeWheel-provided length of the contentFreeWheel-
endstate 8.6.0+ string(Outstream only) Player behavior after all ads within the ad break have played<br / >
Possible values include:

• suspended: A gray background without controls remains.

•close: The player gradually closes.
Allsuspended
forceNonLinearFullSlot booleanFor forcing nonlinear ads to be fullsot ads rather than overlaysIMA-
freewheel objectFreeWheel ad client settings.

See: advertising.freewheel
FreeWheel-
fwassetid stringFreeWheel identifier for content configured in FreeWheel MRMFreeWheel-
loadVideoTimeout numberIn milliseconds, the maximum amount of time between the VAST XML being returned and the adstart event before timing outFreeWheel, IMA15000
locale stringValid two-letter language code for localization of skip-button languageIMA-
maxRedirects numberThe maximum number of redirects the player should follow before timing outIMA4
omidSupport < 8.20.2+ stringConfigure OMID support

   • auto: (default, VAST client only) Loads the OMID script when a parsed ad XML contains a verification node.

   • enabled: Always loads the OMID script as soon as the VAST plugin is loaded. For IMA, enables OMID support.

   • disabled: Prevents the OMID script from ever loading.
IMA, VASTdisabled (IMA), auto (VAST)
ppid < 8.18.3+ stringPass a publisher provided id to the IMA SDKIMA-
placement 8.10.0+ stringValue sent in a bid request that identifies the location of a player

This value provides advertisers with more information before bidding for a video ad opportunity.

You can set one fo the following possible values include:

• article
• banner
• feed
• floating
• instream
• interstitial
• slider
IMA, VASTarticle when advertising.outstream: true

instream for all other configurations
podmessage < 8.6.0 stringText that displays during playback of an ad pod.

Use __AD_POD_CURRENT__ to denote the currently playing item in the pod and __AD_POD_LENGTH__ for the total number of ads in the pod.

WARNING: Starting with JW Player 8.6.0, use the intl object to set this property.
VASTAd xx of yy.
preloadAds booleanPre-requests ad response for an ad break.

WARNING: By setting this property to true, you run the risk of reducing the fill rate for programmatic ads.
IMA,
VAST
false
repeat 8.6.0+ boolean(Outstream only) Controls whether ads play once or continuously

false: After all ads play once, the player enters into an endstate.

true: All ads within the ad break repeat until the viewer or an API call interacts with the player. Unless an ad request fails, the player never enters into an endstate.
Allfalse
requestFilter functionFunction that replaces the XMLHttpRequest used to request the ad tag.

The function takes one parameter, the request.

• request.url: The url being requested

• request.xhr: The XMLHttpRequest instance.

Modify request.xhr or replace it by returning an object that implements open and send. Invoke xhr.onreadystatechange or xhr.onerror callbacks to complete the request. Invoke xhr.abort to receive abort requests from the player.

For more information on XMLHttpRequest, visit MDN.

You must return xhr from the function.
VAST-
requestTimeout numberFor VAST, the maximum amount of time, in milliseconds, between the start of the ad break and a returned VAST file before timing out.

For IMA and Freewheel, the maximum amount of time, in milliseconds, between the start of the ad break and the ad impression being fired.
All5000 (VAST), 10000 (IMA), 15000 (FW)
rules objectEnable ad rules with the given settings and bidders.

See: advertising.rules
IMA,
VAST
-
schedule array | stringLoad an ad schedule from an external JSON block (array) or VAMP XML (string)

See: advertising.schedule
All-
skipmessage < 8.6.0 stringThis is used to provide a customized countdown message

WARNING: Starting with JW Player 8.6.0, use the intl object to set this property.
FreeWheel, VASTSkip ad in xx
skipoffset numberIf not present in the VAST file, adds a skip offset to static VAST adsFreeWheel,
VAST
-
skiptext < 8.6.0 stringThis sets the text of the Skip button after the countdown is over

WARNING: Starting with JW Player 8.6.0, use the intl object to set this property.
FreeWheel,
VAST
Skip
tag array | stringWhen a string, URL of the ad tag for VAST and IMA plugins, or a string place holder for FreeWheel

(VAST and IMA plugins) When an array, URLs of the VAST ad tags to be used as fallbacks in the event that one or multiple ad tags fail to render

• (Outstream - Required)

• (PB - Required) This is used as a fallback tag when using Player Bidding.

When a VAST tag is used, ad tag targeting macros can be added to define features such as GDPR consent.

Do not use this property and advertising.vastxml within the same ad break.

advertising.schedule is ignored if this option is set.

WARNING: If your ad tag uses a VMAP XML template, use the advertising.schedule property.
All-
trackingFilter functionA function that can be used to filter out a tracking pixel URL so that it is not sent.

The function takes one parameter, the tracker URL to be filtered out.

You must return false from the function to cancel the default behavior.
VAST-
truncateMacros booleanTruncates macro values to 1000 characters

Setting this option to false will not truncate the macro value to 1000 characters but GAM still has a limit of 4096 characters.
IMAtrue
vastLoadTimeout numberIn milliseconds, the maximum amount of time between the ad request and a returned VAST file before timing outIMA10000
vastxml stringVAST XML ad tag that is requested during the configured ad break

Do not use this property and advertising.tag within the same ad break.

advertising.schedule is ignored if this option is set
VAST-
vpaidcontrols booleanFor forcing controls to show for VPAID ads

If the VPAID creative has built-in controls, showing the controls may be redundant
IMA,
VAST
-
vpaidmode string(IMA VPAID-only)

disabled: VPAID ads will not play and an error will be returned if VPAID is requested

enabled: VPAID is enabled using a cross domain iFrame. The VPAID ad cannot access the site. VPAID ads that depend on friendly iFrame access may not play

insecure: The VPAID ad will load in a friendly iFrame. This allows the ad access to the site via javascript
Not supported in Freewheel
IMAinsecure
withCredentials 8.13.0+ booleanIndicates if Access-Control requests for ad tags are made using credentials such as cookies, authorization headers, or TLS client certificates.

• true: The player requests an ad tag with credentials. If the request fails, the player makes a second request without credentials.

• false: The player makes a single ad request without credentials.
Alltrue


advertising.bids

Use this property to enable and configure Player Bidding with supported bidders.

jwplayer("myElement").setup({
  "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4", 
  "advertising": {
    ...
    "bids": {
      "bidOnBreaks": 3,
      "settings": {...},
      "bidders": [...]
    }
  ...
  }
});
PropertyDescription
bidders* array
                                                                     
(Required) Defines each bidding partner

See: advertising.bids.bidders
settings* object(Required) Defines the mediation layer, floor price, and timeout

See: advertising.bids.settings
bidOnBreaks numberNumber of ad breaks for which bid requests are sent.

NOTE: For content with more than three ad breaks, change the default setting to 3 and adjust this value depending on performance.

By default, a bid request is made for each ad break.


advertising.bids.bidders[]

jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                "name": "jwdemand",
                "siteId": "KbJ3oU3m",
                "placementId": "24399793",
                "publisherId": "cpVDGgDj"
            }]
        }
        ...
    }
});
jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                "name": "improvedigital",
                "placementId": 1111
            }]
        }
        ...
    }
});
jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                    "name": "criteo",
                    "networkId": 1111,
                    "zoneId": 12345
            }]
        }
        ...
    }
});
jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                "id": "{section_id}",
                "name": "EMX",
                "pubid": "{publisher_id}"
            }]
        }
        ...
    }
});
jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                "formatId": 1234,
                "name": "SmartAdServer",
                "networkId": 12345,
                "pageId": 1234,
                "siteId": "temp1234"
            }]
        }
        ...
    }
});
jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                "id": "{placement_id}",
                "name": "SynacorMedia",
                "pubid": "{seat_id}"
            }]
        }
        ...
    }
});
jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                "id": "{section_id}",
                "name": "IndexExchange"
            }]
        }
        ...
    }
});
jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                "name": "kargo",
                "placementId": "a12345"
            }]
        }
        ...
    }
});
jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                "name": "Rubicon",
                "pubid": "{account_id}",
                "siteId": "{site_id}",
                "zoneId": "{zone_id}"
            }]
        }
        ...
    }
});
jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                "id": "{crid}",
                "name": "MediaNet",
                "pubid": "{cid}"
            }]
        }
        ...
    }
});
jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                "id": "{unit}",
                "name": "OpenX",
                "delDomain": "{del_domain}",
                "platform": "{platform}"
            }]
        }
        ...
    }
});
jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                "id": "{section_id}",
                "name": "PubMatic",
                "pubid": "{publisher_id}"
            }]
        }
        ...
    }
});
jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                "id": "{placement_id}",
                "name": "Sonobi"
            }]
        }
        ...
    }
});
jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                "id": "{channel_id}",
                "name": "SpotX"
            }]
        }
        ...
    }
});
jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                "id": "{section_id}",
                "name": "MediaGrid",
                "pubid": "{publisher_id}"
            }]
        }
        ...
    }
});
jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                "name": "Unruly",
                "pubid": "{siteId}"
            }]
        }
        ...
    }
});
jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                 "name": "VideoByte",
                 "nid": "temp_222",
                 "placementId": "temp_222",
                 "pubId": "temp_222"
            }]
        }
        ...
    }
});
jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                "id": "{placementId}",
                "name": "AppNexus",
                "member": "{member}",
                "invCode": "{invCode}",
                "publisherId": "{publisherId}"
            }]
        }
        ...
    }
});
jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                "name": "YahooSSP",
                "pubid": "{pub_id}",
                "siteId": "{site_id}",
                "id": "{placement_id}"
            }]
        }
        ...
    }
});

  1. Specify a bidder name
PropertyDescription
name * string(Required) Ad partner from which the bid is received

Possible values:
- AppNexus (Xandr)
- criteo
- EMX
- improvedigital (Azerion)
- IndexExchange
- jwdemand
- kargo
- MediaGrid
- MediaNet
- OpenX
- PubMatic
- Rubicon (Magnite)
- SmartAdServer (Equativ)
- Sonobi
- SpotX
- SynacorMedia (iMDS)
- Unruly
- VideoByte
- YahooSSP

  1. Configure properties specific to the named bidder. Click each bidder's name to expand their properties.
JWDemand
PropertyDescription
placementId * integer(Required) Xandr Placement ID
publisherId * string(Required) JW Account ID
propertyId * string(Required) JW Prope ID

Azerion
PropertyDescription
placementId * integer(Required) Azerion placement ID

Criteo
PropertyDescription
zoneId * integer(Required) Criteo zone ID.
networkId * integer(Required) Criteo network ID.

EMX
PropertyDescription
id * string(Required) EMX Digital tagid

Equativ
PropertyDescription
networkId * integer(Required) Equativ network identifier
siteId * string(Required) Equativ placement site ID. If none are provided by Equativ, fill in with any integer.
pageId * integer(Required) Equativ placement page ID. If none are provided by Equativ, fill in with any number.
formatId * integer(Required) Equativ placement format ID. If none are provided by Equativ, fill in with any number.

iMDS
PropertyDescription
id * string(Required) iMDS tagId placement ID or tag ID
pubid * string(Required) iMDS seatId. This will be the same for all ad units.

Index Exchange
PropertyDescription
id * string(Required) Index Exchange siteId. An IX-specific identifier that is associated with this ad unit.

Kargo
PropertyDescription
placementId * string(Required) Kargo Placement ID

Magnite
PropertyDescription
pubid * string(Required) Magnite publisher accountId
siteId * string(Required) Magnite site ID
zoneId * string(Required) Magnite zone ID

Media.net
PropertyDescription
id * string(Required) Media.net cid customer ID
pubid * string(Required) Media.net crid placement ID

OpenX
PropertyDescription
id * string(Required) OpenX unit ad unit ID
delDomain * string(Required) OpenX delivery domain

PubMatic
PropertyDescription
pubid * string(Required) Pubmatic Publisher ID
id stringPubmatic Ad Slot

Sonobi
PropertyDescription
id * string(Required) Sonobi placement_id

SpotX
PropertyDescription
id * string(Required) SpotX channel_id. A unique 5 digit ID that is generated by the SpotX publisher platform when a channel is created.

Unruly
PropertyDescription
pubid * string(Required) Unruly siteId

VideoByte
PropertyDescription
pubId * string(Required) VideoByte Publisher ID
placementId * stringVideoByte Placement ID
nid * stringVideoByte network ID

Xandr
PropertyDescription
id * string(Required) Xandr placementId. You may identify a placement using the invCode and member instead of a placement ID.
invCode stringXandr inventory code. Must be used with member.
member stringXandr member ID. Must be used with invCode.
publisherId stringXandr publisher ID. It is used by the Xandr end point to identify the publisher when placementId is not provided and invCode goes wrong.

YahooSSP
PropertyDescription
pubid * string(Required) YahooSSP Publisher External ID
siteId stringYahooSSP Site ID
id stringYahooSSP placementId



advertising.bids.bidders[].optionalParams

🚧

This object should be used only when IndexExchange, Pubmatic, SpotX, or Xandr (AppNexus) is an ad partner.

jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                "name": "SpotX",
                "id": "85395",
                "optionalParams": {
                    "price_floor": 5.30,
                    "custom": {
                        "name": "{custom_param_name_goes_here}",
                        "value": "{custom_param_value_goes_here}"
                    }
                }
            }]
        }
        ...
    }
});
jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        "bids": {
            ...
            "bidders": [{
                "id": "12345",
                "name": "AppNexus",
                "optionalParams": {
    "keywords": {
        "segment1": "12345",
      "segment2": "12345"
      }
 }
                }
            }]
        }
        ...
    }
});
PropertyDescription
content < 8.13.0 object
                
OpenRTB content object. See: 3.2.16 Object: Content in the OpenRTB 2.5 specification.
custom objectPublisher-defined custom key-value pairs for the bid-request
keywords objectXandr (AppNexus) Only A set of key-value pairs applied to all ad slots on the page.
no_vpaid_ads booleanRemoves VPAID creatives from available creative media types.
passFloorPrice booleanPasses the configured floorPriceCents value in the bid request.
token < 8.13.0 object
Publisher-defined custom pass-through macros


advertising.bids.settings

jwplayer("myElement").setup({
    "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
    "advertising": {
        ...
        "bids": {
            ...
            "settings": {
                "mediationLayerAdServer": "jwp",
                "floorPriceCents": 10,
                "floorPriceCurrency": "usd",
                "bidTimeout": 4000
            }
        }
        ...
    }
});
PropertyDescription
mediationLayerAdServer* string(Required) Mediation layer that decides which ad runs

• jwp: (VAST/IMA) An auction is conducted by the player. If a winner is selected, the winner's ad is called. If no winner is selected, the fallback tag is called. You must specify a floor price.

• jwpspotx: (VAST) No auction is conducted by the player. The player asks SpotX for a bid and calls the returned ad response regardless of price. This option is equivalent to using JW Player mediation with a $.01 floor price. You must set up SpotX line items.

• dfp: (IMA) No auction is conducted by the player. All bids are sent to Google Ad Manager (GAM) and rendered as line items that compete against other line items. GAM serves the winning line item. We recommend setting buckets to minimize the number of line items that you must set up in GAM.

• jwpdfp: (IMA) An initial auction is conducted by the player. If a winner is selected, the winner's ad will is called. If no winner is selected, the fallback tag is called to serve. If no winner is selected for any reason, all valid bids are sent to Google Ad Manager (GAM) where the bid values are rendered as line items to compete against other line items. The winning line item is served by GAM. You must set floorPriceCents. We recommend setting buckets to minimize the number of line items that you must set up in GAM.

Default value: jwp
buckets array(Recommended) Ranges of bid prices

When using buckets, bid prices sent to GAM are rounded down to the closest specified increment. Price buckets are helpful to reduce the number of line items in GAM. Without price buckets, one line item per one-cent increment is required.

This property only applies when dfp or jwpdfp (only for the GAM portion of the mediation) is selected as the mediationLayerAdServer.

See: advertising.bids.settings.buckets[] object
bidTimeout number8.17.0+ Timeout for bid response from when the bid request occurs, in milliseconds

Default value: 3000
Min value: 2000
8.13.0+ Timeout for bid response from when the bid request occurs, in milliseconds

Default value: 2000
< 8.13.0 Timeout for bid response from after the user clicks to play, in milliseconds

If you use SpotX as an ad partner, be sure to make a time allowance for the SpotX SDK to load.

Default value: 2000
consentManagement objectResource for managing the EU General Data Protection Regulation (GDPR) and the California Consumer Privacy Act (CCPA)

See: advertising.bids.settings.consentManagement object
floorPriceCents numberPrice in cents (CPM) that a bid has to beat in order to win

This property must be set when mediationLayerAdServer is set to jwp or jwpdfp.

NOTE: Determining the best floor price depends upon various factors. If you need assistance determining the best floor price, please consult with your JW Player representative or SSP partner.
floorPriceCurrency stringCurrency of the floorPriceCents

This property must be set to usd when mediationLayerAdServer is set to jwp.


advertising.bids.settings.buckets[]

PropertyDescriptionDefault
increment number
                                                    
Nearest increment to which a bid is rounded down, in bidding currency0.01
max numberMaximum value of a price bucket, in bidding currency-
min numberMinimum value of a price bucket, in bidding currency0


advertising.bids.settings.consentManagement

PropertyDescription
gdpr objectResource for supporting the GDPR

See: advertising.bids.settings.consentManagement.gdpr object
usp objectResource for supporting the CCPA

See: advertising.bids.settings.consentManagement.usp object


advertising.bids.settings.consentManagement.gdpr

For more details about the following parameters, see GDPR Consent Management Module.

PropertyDescription
allowAuctionWithoutConsent boolean(TCF v1.1 only) Determines what will happen if obtaining consent information from the CMP fails
cmpApi stringCMP interface that is in use
defaultGdprScope booleanDefines what the gdprApplies flag should be when the CMP doesn’t respond in time or the static data doesn’t supply
rules objectLets the publisher override the default behavior

See: advertising.bids.settings.consentManagment.gdpr.rules object
timeout integerLength of time (in milliseconds) to allow the CMP to obtain the GDPR consent string


advertising.bids.settings.consentManagement.gdpr.rules

PropertyDescription
enforcePurpose booleanDetermines whether to enforce the purpose consent
enforceVendor booleanDetermines whether to enforce vendor signals for this purpose
purpose stringSpecific default behavior that can be overridden by the publisher

Possible Values:
   • storage (Purpose 1)
   • basicAds (Purpose 2)
   • measurement (Purpose 7)
vendorExceptions arrayDefines a list of bidder codes or module names that are exempt from the enforcement of this Purpose


advertising.bids.settings.consentManagement.usp

For more details about the following parameters, see US Privacy Consent Management Module.

PropertyDescription
cmpApi stringUSP-API interface that is in use
timeout integerLength of time (in milliseconds) to allow the USP-API to obtain the CCPA string


advertising.companiondiv

This is an object with 3 properties: id, width and height. Set these to have JW Player load a companion ad from your VAST/IMA tag into a div on your page. See Companion Ads in the Additional Options table for more info.

PropertyDescription
height number
                                           
The targeted desired height of a companion ad that exists in a VAST ad
id stringThe ID of the div to replace with a companion ad
width numberThe targeted desired width of a companion ad that exists in a VAST ad

For an overview of JW Player's advertising capabilities, see its dedicated Video Ads section.



advertising.freewheel

jwplayer("myElement").setup({
  "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
  "fwassetid": "test_asset",
  "duration": 600,
  "advertising": {
    ...
    "freewheel": {
      "networkid": 12345,
      "adManagerURL": "https://mssl.fwmrm.net/libs/adm/6.24.0/AdManager.js",
      "serverid": "http://demo.v.fwmrm.net/ad/g/1",
      "profileid": "12345:html5_test",
      "sectionid": "test_site_section"
    }
  }
});
PropertyDescription
adManagerURL string
                                                                     
URL of the FreeWheel Ad Manager

Your FreeWheel Solution Engineer or Account Representative can provide you with a versioned AdManager URL.
custom objectPasses custom-defined key-value pairs to the Freewheel SDK.
networkid numberFreeWheel identifier of a network
profileid stringFreeWheel identifier of a particular application environment
sectionid stringFreeWheel identifier of a location where the video content plays
serverid stringURL of FreeWheel ad server


advertising.rules

Use this property to control how frequently ads play back. See our Ad Rules Reference support article for more information.

jwplayer("myElement").setup({
  "playlist": [...],
  "advertising": {
    ...
    "rules": {
      "startOn": 2,
      "frequency": 1,
      "timeBetweenAds": 300,
      "startOnSeek": "pre",
      "deferAds": {}
    }
  }
});
PropertyAd clientDescriptionDefault
deferAds 8.12.0+ object
                                                                     
VASTAn empty-object setting that prevents ad playback when the player is on an inactive tab

When the player's tab is active again, the last deferred ad break will play. If you want to halt the playback of unviewable ads, configure the autoPause property.

This feature cannot be enabled from your JW Player dashboard.
-
frequency numberIMA,
VAST
Regularity of ads within a playlist. For example, if frequency: 3, ads play before every third playlist item.

Use 0 to only play ads on the first playlist item.

In the dashboard, this is one of the Ad Frequency Rules.
1
startOn numberIMA,
VAST
First playlist item allowing ad playback.

In the dashboard, this is one of the Ad Frequency Rules.
1
startOnSeek 8.5.0+ stringVASTSetting that defines if a returning visitor is served a pre-roll ad when resuming previously-watched video content.

pre: Player shows returning visitor a pre-roll ad before resuming video playback.

none: Player shows returning visitor no ads and resumes video playback.

In the dashboard, this is one of the Long-form Engagement Rules.

NOTE: Each of the following must be tracked: the unique viewer, the unique piece of content the viewer was watching, and the time when the viewer left the page during playback of the video content. During the player setup, this information must be passed into the player. Use starttime to pass the time location to resume playback.
-
timeBetweenAds numberVASTMinimum time in seconds that must elapse after displaying an ad in a schedule before playing the next scheduled ad.

In the dashboard, this is one of the Long-form Engagement Rules.
0


advertising.schedule

Use this property to load an entire advertising schedule to JW Player, containing multiple ad breaks. The property value can be a URL to a VMAP schedule or an inline JSON block with ads. This schedule will then be applied to each playlist item. For scheduling ads for individual playlist items, see scheduling ads for playlist items.


Ad Schedules with VMAP Files

If you are planning on using a VMAP file, add the link to a VMAP .xml file as the value for schedule:

jwplayer("myElement").setup({
  "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
  "advertising": {
    "client": "vast",
    "adscheduleid": "t4Xk5tsF",
    "schedule": "myvmap.xml"
  }
});

The VMAP schedule will then be applied to each playlist item. See our article about VMAP schedules for more information.


Embedded Ad Schedules with JSON

In order to use a JSON-formatted schedule, you must define at least one ad break configured inside of the schedule property. Each ad break should include an offset and a tag or vastxml.

jwplayer("myElement").setup({
  "playlist": "https://cdn.jwplayer.com/v2/playlists/a12bc3D4",
  "advertising": {
    "client": "vast",
    "adscheduleid": "p4Xk5lsZ",
    "schedule": [
      {
        "tag": "myPreroll.xml",
        "offset": "pre",
        "custParams": {
          "testkey1": "testval1",
          "testkey2": "testval2"
        },
      },
      {
        "vastxml": "<VAST version='2.0'> ... </VAST>",
        "offset": "50%"
      }
    ]
  }
});
PropertyDescriptionDefault
custParams object
                                                                     
Allows for passing custom parameters to an ad break, which then pass through to the URL requested from the ad server-
offset string | numberWhen to play the configured ad tag

Possible Values:
   • pre: (string) Ad plays as a preroll
   • post: (string) Ad plays as a postroll
   • (xx%): (string - VAST only) Ad plays after xx% of the content
   • (number): (number) Ad plays after the specified number of seconds
   • (timecode): (string) Ad plays at a specific time, in HH:MM:SS:sss format
pre
pod array(VAST only) Configures a single ad break to play two or more VAST ads consecutively

Do not use use this property with advertising.schedule[].tag or advertising.schedule[].vastxml within the same ad break. Instead of using this property, we strongly recommend using a VAST 3.0 template to configure ad pods.
-
tag string | arrayWhen a string, URL of the ad tag for VAST and IMA plugins, or a string place holder for FreeWheel

(VAST plugin only) When an array, URLs of the VAST ad tags to be used as fallbacks in the event that one or multiple ad tags fail to render

When a VAST tag is used, ad tag targeting macros can be added to define features such as GDPR consent.

Do not use this property and advertising.schedule[].vastxml within the same ad break.
-
type stringProperty indicating the format of the ad to be served within the ad break

linear: Video ad that interrupts video content playback

nonlinear: Static display ad that overlays a portion of the player and does not interrupt playback. No advertisting cuepoint is shown for this ad break.

If a mix of linear and non-linear ads will serve within an ad break, do not set this property. The player will interrupt video playback for linear ads and will not interrupt video playback for non-linear ads.
linear
vastxml string(VAST only) VAST XML ad tag that is requested during the configured ad break

Do not use this property and advertising.schedule[].tag within the same ad break.
-