Show Menu
TOPICS×

Priority rules

The priority rule defines the priority order of the ad creatives that will be selected for playback from a VAST/VMAP response.

A Priority rule has the following attributes and possible values:

Key Type Values Description
priority Array An array of lowercase mime-types that define the priority in which source creatives must be selected for playback.
item String host Currently only host is supported. This attribute must be present when matches and values attributes are defined.
matches String multiple Possible values:
  • eq - equals
  • ne - not equals
  • co - contains
  • nc - not contains
  • sw - starts with
  • ew - ends with
type String priority The value must always be priority
values Array
TVSDK will use the matches attribute on the item of the source creative and match against the values defined in this array
stream String
Value can be vod or live
{
    "ads": {
        "rules": {
            "default": [
                {
                    "
<b>type</b>": "
<b>priority</b>",
                    "
<b>stream</b>": "vod",
                    "
<b>priority</b>": [
                        "application/x-mpegurl",
                        "application/vnd.apple.mpegurl",
                        "application/x-shockwave-flash",
                        "video/mp4",
                        "video/m4v",
                        "video/x-flv",
                        "video/webm"
                    ]
                },
                {
                    ...
                },
            ]
        }
    }
}