Mid-roll is used when an ad is played in the middle of a video.

To launch an enabled ad campaign as a mid-roll you must specify the Time in seconds or a percentage of the playback duration.

In this example, the mid-roll will start at 10 seconds, then at 20, and in the middle of playback (50%). You can also specify the metadata value for the time and the mid-roll starts at the moment the metadata is received.

The second and third mid-roll are added to the queue to the first one. If the OR logic is enabled, the first working advertisement will be shown.

If you specify a start time for the second and third mid-rolls, they will also start at the specified time.

If you jump to the end of the video, all the mid-rolls will starts. To avoid this, enable the Activity Interval and set the value in seconds.

If the fast forward is within this interval (in this example 10 seconds) from the starting point, then the mid-roll will work. If further, the mid-roll will not work.

Any advertisement on mobile platforms that starts without user gesture (mid-rolls and pos-rolls) is launched muted.

You can also connect the mid-rolls in the code with the id.

midroll:[{time:"5", vast:"id:XXX or id:YYY"}, {time:"50%", vast:"id:ZZZ", minduration:100}]

2024 © PlayerJS

Sign up free

Sign up
By signing up, you agree to Terms of Service
Login if you have an account

Restore password

Forgot email? Contact us