YouTubePHP Documentation

LiveBroadcastSnippet 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.

Basic broadcast information.

Tags
since
1.0.0

Table of Contents

Properties

$actualEndTime  : CarbonImmutable|null
$actualStartTime  : CarbonImmutable|null
$categoryId  : string|null
$channelId  : string|null
$description  : string|null
$isDefaultBroadcast  : bool|null
$liveChatId  : string|null
$publishedAt  : CarbonImmutable|null
$scheduledEndTime  : CarbonImmutable|null
$scheduledStartTime  : CarbonImmutable|null
$thumbnails  : ThumbnailDetails|null
$title  : string|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()}.

Properties

$actualEndTime

public CarbonImmutable|null $actualEndTime

The date and time that the broadcast actually ended. This information is only available once the broadcast's state is complete.

$actualStartTime

public CarbonImmutable|null $actualStartTime

The date and time that the broadcast actually started. This information is only available once the broadcast's state is live.

$categoryId

public string|null $categoryId

The YouTube video category associated with the video broadcast.

$channelId

public string|null $channelId

The ID that YouTube uses to uniquely identify the channel that is publishing the broadcast.

$description

public string|null $description

The broadcast's description. As with the title, you can set this field by modifying the broadcast resource or by setting the description field of the corresponding video resource.

$isDefaultBroadcast

public bool|null $isDefaultBroadcast

Indicates whether this broadcast is the default broadcast. Internal only.

$publishedAt

public CarbonImmutable|null $publishedAt

The date and time that the broadcast was added to YouTube's live broadcast schedule.

$scheduledEndTime

public CarbonImmutable|null $scheduledEndTime

The date and time that the broadcast is scheduled to end.

$scheduledStartTime

public CarbonImmutable|null $scheduledStartTime

The date and time that the broadcast is scheduled to start.

$thumbnails

public ThumbnailDetails|null $thumbnails

A map of thumbnail images associated with the broadcast. For each nested object in this object, the key is the name of the thumbnail image, and the value is an object that contains other information about the thumbnail.

$title

public string|null $title

The broadcast's title. Note that the broadcast represents exactly one YouTube video. You can set this field by modifying the broadcast resource or by setting the title field of the corresponding video resource.

$casts

Attribute name => type token (`"LiveChatMessageSnippet"`, `"Array of Thumbnail"`, `"Map of VideoLocalization"`), used to hydrate nested objects into parts.

protected array<string, string> $casts = ['thumbnails' => 'ThumbnailDetails']

$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 = ['actualEndTime', 'actualStartTime', 'publishedAt', 'scheduledEndTime', 'scheduledStartTime']

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
bool

fill()

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
throws
LogicException

When the part was built without one.

Return values
YouTube

jsonSerialize()

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
bool

offsetGet()

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
Factory

setRawAttribute()

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
On this page

Search results