Ad insertion capabilities

Following is a list of special options and configuration regarding audio advertising.

Opener and closer - instream / midroll

Configure opener and closer of instream ads.

Supported format: mp3, wav

{
  "ad_instream_opener": [
      "https://streamabc-audio-content.s3.eu-central-1.amazonaws.com/testfiles/563935__fester993__guitar-trombone-reverb.wav"
  ],
  "ad_instream_closer": [
      "https://streamabc-audio-content.s3.eu-central-1.amazonaws.com/testfiles/564003__rasmuspnielsen__low-hum-32-hz.wav",
      "https://streamabc-audio-content.s3.eu-central-1.amazonaws.com/testfiles/564309__keybal__thermal-sniper-shot-3.wav",
      "https://streamabc-audio-content.s3.eu-central-1.amazonaws.com/testfiles/563850__nikplaymostories__fail-trombone-wah-wah-wah-sound-effect.mp3"
  ]
}

Opener - preroll

Configure opener for preroll.

Supported format: mp3, wav

Set ad_force_preroll_opener to true if the opener should always be included, e.g. in the case of sponsored channels, the opener is always inserted at the start of the session.

{
  "ad_preroll_opener": [
      "https://streamabc-audio-content.s3.eu-central-1.amazonaws.com/testfiles/563935__fester993__guitar-trombone-reverb.wav"
  ],
  "ad_force_preroll_opener": "true"
}

Closer - preroll

Configure closer for preroll.

Supported format: mp3, wav

{
  "ad_preroll_closer": [
      "https://streamabc-audio-content.s3.eu-central-1.amazonaws.com/testfiles/563935__fester993__guitar-trombone-reverb.wav"
  ],

}

Grace time

The grace time, in seconds, is the time during the QuantumCast Streamer service should ignore ad triggers. This timer starts immediately after an ad trigger with a successful impression.

grace_time

grace time between midrolls

grace_time_preroll

grace time from preroll to first midroll

grace_time_reconnect

grace time between prerolls in case of reconnect

{
    "grace_time": 600,
    "grace_time_preroll": 900,
    "grace_time_reconnect": 30
}

Disable Preroll Ads

Preroll spots for an active session can be suppressed using the URL query parameter context with value fHA6LTE= (AIS default parameter): http://streamurl/?context=fHA6LTE=

Further configuration for ads like ad duration, number of ads as well as disabling ads in general can be done using tokens (JWT). This is the preferred way for the most flexibility but needs more work to implement on the client side.

Disable All Ads

Using a special advanced configuration it is possible to disable all ads for a specific session.

{
    "no_ad_parameter": "noads"
}

This configured parameter has to be passed as value of the URL query parameter context. For the example above this would lead to: http://streamurl/?context=noads

Keep in mind that everyone that knows this value can suppress ads in your stream. So it is recommended to use this parameter for specific purposes only. It can be changed on the fly if the value is misused or leaked.

For a more secure way to do this it is also possible to use tokens (JWT). Tokens have a limited lifetime and can not be used for multiple sessions.

Max. ad duration per session

The max. ad duration per session, in seconds, indicates the maximum offset that the listener may have in the session. This could be necessary, for example, if the listener listens to the channel all day.

{
    "ad_duration_max": 900
}

Geoblocking / Geostreaming

In disallowed countries an audio file is played and the stream stopped.

{
    "geo_allow_countries": ["DE","AT"],
    "geo_fallback": "https://url.zu.einer.audiodatei",
    "geo_active_hours": [20,21]
}
geo_allow_countries

Array specification of which countries are allowed to stream freely, all others are blocked; specify as ISO code

geo_fallback

URL to a file that is played as an announcement

geo_active_hours

Optional array with hours as a number when blocking is active. If it is always to be active, omit this block or specify an empty array.


Authentication

Basic access

The simplest technique for enforcing access controls.

{
    "mountacl": {
        "username": "",
        "password": ""
    }
}

Token access

QuantumCast supports authentication by using a Token. Token-Based Authentication, relies on a signed JSON Web Token (JWT) that is sent to the server on each request.