Ad Request

Prev Next

HTTP Endpoint

There is a short delay between the time an ad request is served and when the capping status is propagated within the entire Triton platform. We highly recommend to have a minimum of five seconds between ad requests. Back-to-back requests under five seconds are not guaranteed to have frequency capping applied.

The On-Demand Service is available over a public HTTPS endpoint:

https://<HOST>/ondemand/ars?<parameters>

...where <HOST> is replaced by a global or regional endpoint.

(HTTP is also available, but HTTPS is highly recommended.)

Please contact Triton Digital Customer Support to obtain the correct On-Demand Service host name to use for ad requests for pre-production and production uses.

A complete example, using the global endpoint and many of the available parameters, would look like this:

https://cmod-world.live.streamtheworld.com/ondemand/ars?stid=12345&type=midroll&mindur=15&maxdur=30


Ad request URLs must not exceed 4096 characters. If the request exceed this limit, the On-Demand ad server will return a 414 status ("URI Too Long").

If an Ad request is done through XMLHttpRequest (XHR), the player must make sure the flag "withCredentials" is set to true. This flag allows cookies to be passed  with the XMLHttpRequest and be read by the On-Demand service. Without this flag, cookies set by cookie synchronization cannot be read.

For more information on how to pass cookies with cross-site XML requests, refer to:

https://developer.mozilla.org/en-US/docs/Web/HTTP/Access_control_CORS#Requests_with_credentials