Custom Ads

Custom Ads is an feature that allows you to play a preroll ad for listeners before your stream plays, or a postroll after your stream. Available only on the Radio Mast Streaming Network.

A preroll ad is a jingle or message that plays when a listener connects, before your stream's audio is heard. A postroll ad plays after a listener hits a timelimit.

Custom Ads are inserted server-side and will be heard on any device or player where your stream can play. No player-side customization is required. All "ads" are your own - Radio Mast will not alter your stream or insert third party advertising.

With Custom Ads, you can:

  • Play a message or jingle such as your station callsign for each listener before your stream plays. (preroll)
  • Play a message or jingle after a listener exceeds a time limit. (postroll)
  • Play different preroll messages for listeners in different cities or countries. (dynamic ads)

Getting Started

To get started with Custom Ads, log into your Radio Mast account and click a radio station (if you have multiple), then:

  1. Click Streams in the navigation bar on the left, to expand it.
  2. Under Streams, then click Custom Ads.
  3. Click "Create an Ad".
  4. Enter a name for your ad and choose an audio file to upload from your computer.
  5. Choose which stream(s) to assign the ad to. This will set the ad to play as a preroll on the chosen streams.
  6. Click the Save Ad button.

The next time you listen to your stream, you should hear your preroll ad play before your stream starts. Note that it may take up to 30 seconds for your changes to apply.

Preroll Ads

A preroll ad is an audio file that plays before listeners hear your stream.

Postroll Ads

A postroll ad is an audio file that plays after your listeners exceed their time limit. Currently, time limits can only be imposed using Custom Listener Authentication and so postroll ads can only be inserted dynamically.

Requirements

Custom Ads are compatible only with MP3, AAC, HE-AAC v1, and HE-AAC v2 (AAC+) streams. They will not play on Ogg Vorbis, FLAC, or Opus streams.

Custom Ads may be uploaded as any of the following audio file formats: .mp3, .m4a (AAC), .aac (ADTS AAC), .ogg, .flac

Ads are automatically transcoded to ensure they match the audio format of a stream.

Dynamic Custom Ads

This is an advanced feature recommended for power users only.

Preroll or postroll ads can be be dynamically customized on a per-listener basis using Custom Listener Authentication.

When a listener connects to a stream that has Custom Listener Authentication configured, a webhook HTTP request is dispatched to your webhook handler. In the response to this webhook, your handler can reply with a preroll HTTP header with a value containing the URL of an audio file to insert as the preroll for this listener.

By inspecting the parameters passed to your webhook handler, you can determine information about the listener, such as their IP address and user-agent. This information can be used to tailor the ad for the listener.

For more details, please see Custom Listener Authentication.

For examples of how to insert Dynamic Custom Ads, please refer to our Code Samples for Custom Listener Authentication

Checklist

The following checklist outlines the steps needed to use Dynamic Custom Ads on your stream:

  • Configure Custom Listener Authentication on your stream, and enter the URL of your webhook handler.
  • Ensure your webhook handler responds with a preroll: <url> HTTP header, where <url> points to a valid audio file.
  • Ensure the audio file matches the exact audio format for your stream, including the codec, channel count, samplerate, and bitrate.

Troubleshooting / Common Issues

  • My stream stops playing after the preroll
    • The format of your audio file does not match your stream.
  • My preroll is not playing
    • Double check the response from your webhook handler, and verify that it contains the correct header and the ad file URL is valid.
    • Make sure your audio file is not larger than 5 MB.