Resource: LiveBroadcast
A liveBroadcast resource represents an event that is streamed as live video on YouTube.
| JSON representation |
|---|
{
"kind": string,
"etag": string,
"id": string,
"snippet": {
"publishedAt": string,
"channelId": string,
"title": string,
"description": string,
"categoryId": string,
"thumbnails": {
object ( |
| Fields | |
|---|---|
kind |
Output only. Identifies what kind of resource this is. Value: the fixed string |
etag |
Etag of this resource. |
id |
The ID that YouTube assigns to uniquely identify the broadcast. |
snippet |
The |
snippet.publishedAt |
Output only. The date and time that the broadcast was added to YouTube's live broadcast schedule, in ISO 8601 format. |
snippet.channelId |
Output only. The ID that YouTube uses to uniquely identify the channel that is publishing the broadcast. |
snippet.title |
The broadcast's title, up to 100 characters long. Required when creating a broadcast. Each broadcast represents one YouTube video, so you can set this field by modifying the broadcast resource or by setting the |
snippet.description |
The broadcast's description, up to 5000 characters long. You can set this field by modifying the broadcast resource or by setting the |
snippet.categoryId |
The YouTube video category associated with the broadcast. If omitted when creating a broadcast, YouTube assigns the Entertainment category. |
snippet.thumbnails |
Output only. 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. |
snippet.scheduledStartTime |
The date and time that the broadcast is scheduled to start, in ISO 8601 format. The start time can be at most 3 years in the future. Broadcasts created in YouTube Studio without a scheduled start time use Unix epoch zero ( |
snippet.scheduledEndTime |
The date and time that the broadcast is scheduled to end, in ISO 8601 format. If omitted, the broadcast is scheduled to continue indefinitely. |
snippet.actualStartTime |
Output only. The date and time that the broadcast actually started, available only once the broadcast's state is |
snippet.actualEndTime |
Output only. The date and time that the broadcast actually ended, available only once the broadcast's state is |
snippet.isDefaultBroadcast |
Whether this broadcast is the channel's default broadcast for the deprecated Stream Now workflow. See the YouTube Live Streaming API revision history for details. This field is read-only; setting it to |
snippet.liveChatId |
Output only. The ID of the live chat bound to this broadcast. You can use this value with |
status |
The |
status.lifeCycleStatus |
Output only. The broadcast's status, updated using the Valid values of this enum field are:
|
status.privacyStatus |
The broadcast's privacy status. Each broadcast represents one YouTube video, so privacy settings match those supported for videos. You can set this field by modifying the broadcast resource or by setting the Valid values of this enum field are:
|
status.recordingStatus |
Output only. The broadcast's recording status. Valid values are Valid values of this enum field are:
|
status.madeForKids |
Whether YouTube designates the broadcast as made for kids. This field is read-only; setting it in |
status.selfDeclaredMadeForKids |
Whether the creator declares the broadcast to be made for kids. You can set this value only when creating a broadcast with |
contentDetails |
The |
contentDetails.boundStreamId |
Output only. The unique ID of the live stream bound to the broadcast. |
contentDetails.boundStreamLastUpdateTimeMs |
Output only. The date and time when the live stream referenced by |
contentDetails.monitorStream |
The |
contentDetails.monitorStream.enableMonitorStream |
Whether the monitor stream is enabled for the broadcast. When |
contentDetails.monitorStream.broadcastStreamDelayMs |
Length of the live broadcast delay in milliseconds when |
contentDetails.monitorStream.embedHtml |
Output only. HTML code that embeds a player for the monitor stream, populated when |
contentDetails.enableEmbed |
Whether the broadcast video can play in an embedded player. If you also record the video (using |
contentDetails.enableDvr |
Whether viewers can access DVR controls (pausing, rewinding, or fast forwarding) while watching the video. The default value is |
contentDetails.enableContentEncryption |
Whether YouTube enables content encryption for the broadcast. Accepted in |
contentDetails.recordFromStart |
Whether YouTube automatically starts recording when the event goes live. The default value is |
contentDetails.enableClosedCaptions |
Deprecated: Use |
contentDetails.closedCaptionsType |
Configures closed captioning for the broadcast. Valid values are Valid values of this enum field are:
|
contentDetails.enableLowLatency |
Deprecated: Use |
contentDetails.latencyPreference |
The broadcast latency mode. Valid values are Valid values of this enum field are:
|
contentDetails.projection |
The projection format of this broadcast. Valid values are Valid values of this enum field are:
|
contentDetails.mesh |
The projection mesh when A base64-encoded string. |
contentDetails.enableAutoStart |
Whether the broadcast starts automatically when you begin streaming video to the bound live stream, transitioning directly to |
contentDetails.enableAutoStop |
Whether the broadcast stops automatically about one minute after you stop streaming video to the bound live stream. The default value is |
contentDetails.availabilityConfig |
Optional. The broadcast's region availability or restriction configuration. If unset, no region restriction is enforced. Setting this property requires creator geo-restriction eligibility ( |
contentDetails.availabilityConfig.globalConfig |
Video is available in all regions except the ones specified in the config. |
contentDetails.availabilityConfig.globalConfig.excludedRegionCodes[] |
Optional. Regions where the video is blocked, specified as uppercase two-letter ISO 3166-1 alpha-2 country codes. |
contentDetails.availabilityConfig.globalConfig.interval |
Default time window when the video is available for all non-blocked regions. Required for VODs and completed live broadcasts (pass an empty |
contentDetails.availabilityConfig.globalConfig.interval.startTime |
Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
contentDetails.availabilityConfig.globalConfig.interval.endTime |
Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
contentDetails.availabilityConfig.regionsConfig |
Video is available in the specified regions only. |
contentDetails.availabilityConfig.regionsConfig.regionIntervals[] |
Required. A list of regions and time windows where the video is available. If a region is specified multiple times, the union of all intervals is used. |
contentDetails.availabilityConfig.regionsConfig.regionIntervals[].regionCode |
Required. Region where the video is available, specified as an uppercase two-letter ISO 3166-1 alpha-2 country code. |
contentDetails.availabilityConfig.regionsConfig.regionIntervals[].interval |
Time window when the video is available for the region. Required for VODs and completed live broadcasts (pass an empty |
contentDetails.availabilityConfig.regionsConfig.regionIntervals[].interval.startTime |
Optional. Inclusive start of the interval. If specified, a Timestamp matching this interval will have to be the same or after the start. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
contentDetails.availabilityConfig.regionsConfig.regionIntervals[].interval.endTime |
Optional. Exclusive end of the interval. If specified, a Timestamp matching this interval will have to be before the end. Uses RFC 3339, where generated output will always be Z-normalized and use 0, 3, 6 or 9 fractional digits. Offsets other than "Z" are also accepted. Examples: |
statistics |
Output only. The |
statistics.concurrentViewers |
Output only. Number of viewers watching the broadcast. Defaults to |
monetizationDetails |
The |
monetizationDetails.cuepointSchedule |
Automated midroll ad cuepoint schedule for the broadcast. Required when |
monetizationDetails.cuepointSchedule.enabled |
Whether automated midroll ad insertion is enabled ( |
monetizationDetails.cuepointSchedule.pauseAdsUntil |
Pauses automatic cuepoint insertion until this timestamp, in ISO 8601 format. The timestamp can be at most 10 minutes in the future and is valid only while the broadcast is |
monetizationDetails.cuepointSchedule.creatorCuepointConfig |
Creator-managed automated cuepoint scheduling configuration. Mutually exclusive with |
monetizationDetails.cuepointSchedule.creatorCuepointConfig.scheduleStrategy |
Strategy used to schedule automated cuepoints. Required when Valid values of this enum field are:
|
monetizationDetails.cuepointSchedule.creatorCuepointConfig.repeatIntervalSecs |
Interval in seconds between automatically inserted cuepoints. Required when |
monetizationDetails.cuepointSchedule.ytOptimizedCuepointConfig |
YouTube-optimized automated cuepoint scheduling configuration. Mutually exclusive with Valid values of this enum field are:
|
monetizationDetails.adsMonetizationStatus |
The ads monetization status of the broadcast. Valid values are Valid values of this enum field are:
|
monetizationDetails.eligibleForAdsMonetization |
Whether the broadcast is eligible for ads monetization. Returns |
Methods |
|
|---|---|
|
Binds a YouTube broadcast to a stream or removes an existing binding between a broadcast and a stream. |
|
Deletes a broadcast. |
|
Creates a broadcast. |
|
Inserts an ad cuepoint into a broadcast, replacing the Content-Owner-only liveCuepoints.insert method without requiring Content Owner authorization. |
|
Returns a list of YouTube broadcasts that match the API request parameters. |
|
Changes the status of a YouTube live broadcast and initiates any processes associated with the new status. |
|
Updates a broadcast. |