Anúncios VAST / VPAID

  Desculpe, este artigo está disponível em inglês

The video advertising settings described below are available in the Enterprise version.

Player supports all VAST/VPAID versions. 

Links also can be passed in a code with the parameters preroll, pauseroll, postroll and midroll (corresponding formats should still be enabled in the builder).

You can specify one link or several with the help of operators or and and.

An example of waterfall where just first active tag will work:

link or link or link

Using the operator and you create a queue in which each advertisement will be requested and displayed, if it works:

link and link and link

Operators can be mixed. For example, this means that two advertisements will be shown in a row

link1 or link2 and link3 or link4 

Midrolls

Midrolls need to be specified as an object with the start time

midroll:[{time:"5",vast:"link"},{time:"50%",vast:"link"}]

time — advertising start time in seconds or percentage

The player also supports VMAP and Adpods for creating ad queue.

Placeholders

In tag links you can use placeholders that should be replaced at the request stage for certain data. These placeholders must be enclosed in parentheses.

(random) — random number for disabling cache

(referer) — page address where the player is running

(host) — domain where the player is running

(width) — player width

(height) — player height

(duration) — duration of the current content

(visibility)visibility of the player

(adblock) — enable or disable AdBlock

(volume) — ad volume during playback

Sample

//site.com/vast.xml?rand=(random)&width=(width)&height=(height)

You can specify your custom variables using the vast_replace parameter

vast_replace:{"[var1]":"1","[var2]:"2"}
//site.com/vast.xml?v1=[var1]&v2=[var2] --> //site.com/vast.xml?v1=1&v2=2

This data can be updated on the fly via JS API

player.api("update:vast_replace",{"[var1]":"3","[var2]":"4"});

Restrictions

You can limit the playback of advertising on various platforms. This works by adding a special parameter to the link in square brackets.

//site.com/vast.xml[no_mobile]

[no_desktop] — advertising link will not work on desktop computers

[no_mobile] — advertising link will not work on mobile devices

[no_mobiletv] — advertising link will not work on mobile devices and TV

[no_tv] — advertising link will not work on TV

[no_lg] — advertising link will not work on mobile devices and TV LG

[mute] — advertising sound will be muted if possible

[unmute] — advertising sound will be unmuted if possible

[remove] — advertising link will be removed from the queue after the first request

If you need to disable all player interface elements in VAST advertising you can add the nocontrols variable to the link

//site.com/vast.xml?nocontrols

You can also use the yescontrols if you want to allow interface elements on the contrary (from version 9.57).

From version 9.48 you can filter ads by file, if there is a link to the ad video file or js vpaid contains the value from the variable vast_denied_files

vast_denied_files:"sorry.mp4,broken.js"

Custom rotation via JS

You can specify the name of the js function (with js: at the beginning) instead of a tag. This function will return the real link to VAST. After the end of the advertisement, the player will re-poll this function until it returns a string that is not a link.

preroll:"js:MyPreroll

Ad Pods

The player supports the VAST with a multiply advertising creatives Ad. By default, they are lined up in OR logic, but if the wrapper has the parameter allowMultipleAds="true" set, it is added with logic AND. If this is not a wrapper, but directly advertising creative, then the logic AND can be enabled in the VAST / Settings / Show all Ad Pods in sequence option.

From version 9.52, you can use the minVisibility parameter for a wrapper inside Ad (the visibility tracking plugin must be enabled). In this case, the advertisement will not be shown if the visibility is lower than specified in the parameter.

<Ad><Wrapper allowMultipleAds="true" minVisibility="50">

20.5.2
2025 © PlayerJS

Iniciar sessão

Iniciar sessão

Inscrever-se gratuitamente

Inscrever-se
Ao inscrever-se, o utilizador concorda com Termos de Serviço
Login se tiver uma conta

Restaurar a palavra-passe

Restaurar
Esqueceu-se do e-mail? Contacte-nos