1

I am using JW Player I have one code which works fine but I want 2 midroll vast ads in the player. When I try to Copy and paste the same code with different timings. Code with Higher Time only works.

The Below code workes Fine as ad plays after 5 Minutes, But If I try to copy-paste same code again then Code with higher Timelike 600 seconds then only that code work, the previous one didn't works

advertising: {
                client: "vast",
                schedule: {
                    "myAds": {
                        "offset":300,
                        "tag": "https://www.example.com"
                    }
                }
            },

If I try to Put Code like this then only One ads works...

advertising: {
                client: "vast",
                schedule: {
                    "myAds": {
                        "offset":300,
                        "tag": "https://www.example.com"
                    }
                }
            },

advertising: {
                client: "vast",
                schedule: {
                    "myAds": {
                        "offset":600,
                        "tag": "https://www.example.com"
                    }
                }
            },

Please Help Me.

Prince Vegeta
  • 719
  • 6
  • 21

2 Answers2

1
"advertising": {
   "client" : "vast",
   "schedule" : [
    {
      tag: ["https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator=[timestamp]"],
      type: "linear",
      offset: 15
    },
    {
      tag: ["https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator=[timestamp]"],
      type: "linear",
      offset: 45
    },
    {
      tag: ["https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=/124319096/external/single_ad_samples&ciu_szs=300x250&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&cust_params=deployment%3Ddevsite%26sample_ct%3Dskippablelinear&correlator=[timestamp]"],
      type: "linear",
      offset: 125
    }
  ]
}
Maahi Bhat
  • 191
  • 12
0

You can add 2 VAST ads by using the schedule block:

advertising: {
                client: "vast",
                schedule: [{
                        "offset":300,
                        "tag": "https://www.example.com"
                    }, {
                        "offset":600,
                        "tag": "https://www.example.com"
                    }]
            },

For more information please refer to the docs: https://developer.jwplayer.com/jw-player/docs/developer-guide/advertising/monetize-your-content/#add-multiple-ad-breaks-to-a-player

Kamil Sindi
  • 21,782
  • 19
  • 96
  • 120