type VideoPosition (v202505)

  • A VideoPosition represents a targetable position within a video, allowing ads to be shown at specific points like pre-roll, mid-roll, or post-roll.

  • You can target all video positions, the position before the video starts (preroll), positions within the video (midroll), or the position after the video finishes (postroll).

  • For mid-roll positions, you can specify a midrollIndex to target a particular mid-roll instance.

  • The positionType field indicates the type of video position, while the midrollIndex field specifies the index for mid-roll targeting.

Represents a targetable position within a video. A video ad can be targeted to a position (pre-roll, all mid-rolls, or post-roll), or to a specific mid-roll index.


Namespace
https://www.google.com/apis/ads/publisher/v202505

Field

positionType

VideoPosition.Type

The type of video position (pre-roll, mid-roll, or post-roll).


Enumerations
UNKNOWN
The value returned if the actual value is not exposed by the requested API version.
ALL
This position targets all of the above video positions.
PREROLL
The position defined as showing before the video starts playing.
MIDROLL
The position defined as showing within the middle of the playing video.
POSTROLL
The position defined as showing after the video is completed.

midrollIndex

xsd:int

The index of the mid-roll to target. Only valid if the positionType is VideoPositionType.MIDROLL, otherwise this field will be ignored.