Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Passing a parameter to JavaScript creative

How can I pass a value from the JWPlayer OVA configuration block on my web page to a linear VPAID JavaScript creative that's specified in that block? I'm aware of the "custParams" property but I'm not sure if this is the correct property to use. If "custParams" is the correct property to use, how is the passed value retrieved in the JavaScript creative? My configuration block resembles the following:

<script type="text/JavaScript">
var playerInstance = jwplayer("videoPlayer");
file: "somevideo.mp4",
height: 720,
width: 1200,
advertising: {
client: 'vast',
schedule: {
postroll: {
offset: 'post',
tag: "",
custParams: {
valueToPass: "someValue"

I'd appreciate any assistance you can provide!

3 Community Answers


JW Player Support Agent  
0 rated :

I think something like this should help:

As far as how the ad itself gets a reference to the values, not sure as we do not write VAST or VPAID ads, we only play them


0 rated :

Thanks for your response, George! I know that JWPlayer doesn't write ads per se, but I thought that you'd know how things should work given that you've implemented the VAST/VPAID spec for the JWPlayer. Specifically, the 'custParams' property of the player configuration block looks particularly interesting but I can't find a description anywhere of how these properties are used by the player in the context of the ad with which they're associated. For example, are the key:value pairs specified in the 'custParams' section just appended to the ad tag and then sent to the ad server?


JW Player Support Agent  
0 rated :

Nothing gets added to the ad tag unless explicitly set by the developer. You could for example add a custom param to the the ad request by using the macro __ item-myparam __

Example below:

Notice in the ad tag url I’ve included:
cust_params=__ item-category __

This question has received the maximum number of answers.