Resource: VideoAdvertisingOption
The advertising settings for a video. The settings identify the types of ads that can run during the video as well as the times when ads are allowed to run during the video.
JSON representation |
---|
{
"kind": string,
"adFormats": [
string
],
"breakPosition": [
string
],
"adBreaks": [
{
object ( |
Fields | |
---|---|
kind |
The type of the API resource. For this resource, the value is |
adFormats[] |
A list of ad formats that the video is allowed to show. Note: as of November 2023, only |
breakPosition[] |
The point at which the break occurs during the video playback. |
adBreaks[] |
A list of times when YouTube can show an in-stream advertisement during playback of the video. |
autoGeneratedBreaks |
Enables this video for automatically generated midroll breaks. |
id |
The ID that YouTube uses to uniquely identify the video associated with the advertising settings. |
tpAdServerVideoId |
A value that uniquely identifies the video to the third-party ad server. |
tpTargetingUrl |
The base URL for a third-party ad server from which YouTube can retrieve in-stream ads for the video. |
tpUrlParameters |
A parameter string to append to the end of the request to the third-party ad server. |
AdBreak
An adBreak
resource contains information about a time when YouTube can show an in-stream advertisement during video playback.
JSON representation |
---|
{ "position": string, "midrollSeconds": integer } |
Fields | |
---|---|
position |
The point at which the break occurs during the video playback. |
midrollSeconds |
The time of the ad break specified as the number of seconds after the start of the video when the break occurs. |
Methods |
|
---|---|
|
Retrieves advertising settings for the specified video. |
|
Retrieves details about the types of allowed ads for a specified partner- or user-uploaded video. |
|
Patches the advertising settings for the specified video. |
|
Updates the advertising settings for the specified video. |