VideoContentDetails
extends Part
in package
This file is generated from spec/discovery.json (YouTube Data API v3, revision 20260924) by tools/generate.php. Do not edit it by hand - run `composer spec:build` instead.
Details about the content of a YouTube Video.
Tags
Table of Contents
Constants
- CAPTION_FALSE : mixed = 'false'
- A `caption` of `false`.
- CAPTION_TRUE : mixed = 'true'
- A `caption` of `true`.
- DEFINITION_HD : mixed = 'hd'
- hd
- DEFINITION_SD : mixed = 'sd'
- sd
- PROJECTION_360 : mixed = '360'
- A `projection` of `360`.
- PROJECTION_RECTANGULAR : mixed = 'rectangular'
- A `projection` of `rectangular`.
Properties
- $caption : string|null
- $contentRating : ContentRating|null
- $countryRestriction : AccessPolicy|null
- $definition : string|null
- $dimension : string|null
- $duration : string|null
- $hasCustomThumbnail : bool|null
- $licensedContent : bool|null
- $projection : string|null
- $regionRestriction : VideoContentDetailsRegionRestriction|null
- $casts : array<string, string>
- Attribute name => type token (`"LiveChatMessageSnippet"`, `"Array of Thumbnail"`, `"Map of VideoLocalization"`), used to hydrate nested objects into parts.
- $dates : array<int, string>
- Attribute names holding RFC 3339 timestamps, read back as {@see CarbonImmutable}. They are stored and serialised as the strings YouTube sent.
- $youtube : ?YouTube
Methods
- __construct() : mixed
- __debugInfo() : array<string, mixed>
- __get() : mixed
- __isset() : bool
- __set() : void
- __toString() : string
- __unset() : void
- attributeExists() : bool
- fill() : void
- getAttribute() : mixed
- getCasts() : array<string, string>
- getDates() : array<int, string>
- getRawAttribute() : mixed
- Reads straight from the attribute bag, skipping the `get{Key}Attribute` hook.
- getRawAttributes() : array<string, mixed>
- getYouTube() : YouTube
- The client this part came from.
- jsonSerialize() : array<string, mixed>
- The payload this part would be sent back to YouTube as: nested parts and collections flattened, timestamps as RFC 3339 strings.
- offsetExists() : bool
- offsetGet() : mixed
- offsetSet() : void
- offsetUnset() : void
- setAttribute() : void
- factory() : Factory
- Builds another part from the same client - for nested objects.
- setRawAttribute() : void
- Writes straight to the attribute bag, skipping the `set{Key}Attribute` hook and any cast. For use *inside* a mutator, which would otherwise have no way to store its shaped value without recursing through {@see setAttribute()}.
Constants
CAPTION_FALSE
A `caption` of `false`.
public
mixed
CAPTION_FALSE
= 'false'
CAPTION_TRUE
A `caption` of `true`.
public
mixed
CAPTION_TRUE
= 'true'
DEFINITION_HD
hd
public
mixed
DEFINITION_HD
= 'hd'
DEFINITION_SD
sd
public
mixed
DEFINITION_SD
= 'sd'
PROJECTION_360
A `projection` of `360`.
public
mixed
PROJECTION_360
= '360'
PROJECTION_RECTANGULAR
A `projection` of `rectangular`.
public
mixed
PROJECTION_RECTANGULAR
= 'rectangular'
Properties
$caption
public
string|null
$caption
The value of captions indicates whether the video has captions or not. One of
the CAPTION_* constants.
$contentRating
public
ContentRating|null
$contentRating
Specifies the ratings that the video received under various rating schemes.
$countryRestriction
public
AccessPolicy|null
$countryRestriction
The countryRestriction object contains information about the countries where a video is (or is not) viewable.
$definition
public
string|null
$definition
The value of definition indicates whether the video is available in high
definition or only in standard definition. One of the DEFINITION_* constants.
$dimension
public
string|null
$dimension
The value of dimension indicates whether the video is available in 3D or in 2D.
$duration
public
string|null
$duration
The length of the video. The tag value is an ISO 8601 duration in the format PT#M#S, in which the letters PT indicate that the value specifies a period of time, and the letters M and S refer to length in minutes and seconds, respectively. The # characters preceding the M and S letters are both integers that specify the number of minutes (or seconds) of the video. For example, a value of PT15M51S indicates that the video is 15 minutes and 51 seconds long.
$hasCustomThumbnail
public
bool|null
$hasCustomThumbnail
Indicates whether the video uploader has provided a custom thumbnail image for the video. This property is only visible to the video uploader.
$licensedContent
public
bool|null
$licensedContent
The value of is_license_content indicates whether the video is licensed content.
$projection
public
string|null
$projection
Specifies the projection format of the video. One of the PROJECTION_*
constants.
$regionRestriction
public
VideoContentDetailsRegionRestriction|null
$regionRestriction
Deprecated. The regionRestriction object contains information about the countries where a video is (or is not) viewable. The object will contain either the contentDetails.regionRestriction.allowed property or the contentDetails.regionRestriction.blocked property.
$casts
Attribute name => type token (`"LiveChatMessageSnippet"`, `"Array of Thumbnail"`, `"Map of VideoLocalization"`), used to hydrate nested objects into parts.
protected
array<string, string>
$casts
= ['contentRating' => 'ContentRating', 'countryRestriction' => 'AccessPolicy', 'regionRestriction' => 'VideoContentDetailsRegionRestriction']
$dates
Attribute names holding RFC 3339 timestamps, read back as {@see CarbonImmutable}. They are stored and serialised as the strings YouTube sent.
protected
array<int, string>
$dates
= []
$youtube read-only
protected
?YouTube
$youtube
= null
Methods
__construct()
public
__construct([YouTube|null $youtube = null ][, array<string, mixed>|object $attributes = [] ]) : mixed
Parameters
- $youtube : YouTube|null = null
-
The client, for behaviour that calls the API.
- $attributes : array<string, mixed>|object = []
__debugInfo()
public
__debugInfo() : array<string, mixed>
Return values
array<string, mixed>__get()
public
__get(string $name) : mixed
Parameters
- $name : string
__isset()
public
__isset(string $name) : bool
Parameters
- $name : string
Return values
bool__set()
public
__set(string $name, mixed $value) : void
Parameters
- $name : string
- $value : mixed
__toString()
public
__toString() : string
Return values
string__unset()
public
__unset(string $name) : void
Parameters
- $name : string
attributeExists()
public
attributeExists(string $key) : bool
Parameters
- $key : string
Return values
boolfill()
public
fill(array<string, mixed> $attributes) : void
Parameters
- $attributes : array<string, mixed>
getAttribute()
public
getAttribute(string $key) : mixed
Parameters
- $key : string
getCasts()
public
getCasts() : array<string, string>
Return values
array<string, string>getDates()
public
getDates() : array<int, string>
Return values
array<int, string>getRawAttribute()
Reads straight from the attribute bag, skipping the `get{Key}Attribute` hook.
public
getRawAttribute(string $key) : mixed
Parameters
- $key : string
getRawAttributes()
public
getRawAttributes() : array<string, mixed>
Return values
array<string, mixed>getYouTube()
The client this part came from.
public
getYouTube() : YouTube
Tags
Return values
YouTubejsonSerialize()
The payload this part would be sent back to YouTube as: nested parts and collections flattened, timestamps as RFC 3339 strings.
public
jsonSerialize() : array<string, mixed>
Return values
array<string, mixed>offsetExists()
public
offsetExists(mixed $offset) : bool
Parameters
- $offset : mixed
Return values
booloffsetGet()
public
offsetGet(mixed $offset) : mixed
Parameters
- $offset : mixed
offsetSet()
public
offsetSet(mixed $offset, mixed $value) : void
Parameters
- $offset : mixed
- $value : mixed
offsetUnset()
public
offsetUnset(mixed $offset) : void
Parameters
- $offset : mixed
setAttribute()
public
setAttribute(string $key, mixed $value) : void
Parameters
- $key : string
- $value : mixed
factory()
Builds another part from the same client - for nested objects.
protected
factory() : Factory
Return values
FactorysetRawAttribute()
Writes straight to the attribute bag, skipping the `set{Key}Attribute` hook and any cast. For use *inside* a mutator, which would otherwise have no way to store its shaped value without recursing through {@see setAttribute()}.
protected
setRawAttribute(string $key, mixed $value) : void
Parameters
- $key : string
- $value : mixed