Insert
|
|||||
|
|
Uploads a caption track
Authorization
To use this building block you will have to grant access to at least one of the following scopes:
- See, edit, and permanently delete your YouTube videos, ratings, comments and captions
- View and manage your assets and associated content on YouTube
Input
This building block consumes 21 input parameters
Name | Format | Description |
---|---|---|
part Required |
STRING |
The part parameter specifies the caption resource parts that the API response will include. Set the parameter value to snippet |
onBehalfOf |
STRING |
ID of the Google+ Page for the channel that the request is be on behalf of |
onBehalfOfContentOwner |
STRING |
Note: This parameter is intended exclusively for YouTube content partners. The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner |
sync |
BOOLEAN |
The sync parameter indicates whether YouTube should automatically synchronize the caption file with the audio track of the video. If you set the value to true, YouTube will disregard any time codes that are in the uploaded caption file and generate new time codes for the captions. You should set the sync parameter to true if you are uploading a transcript, which has no time codes, or if you suspect the time codes in your file are incorrect and want YouTube to try to fix them |
etag |
STRING |
Etag of this resource |
id |
STRING |
The ID that YouTube uses to uniquely identify the caption track |
kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "youtube#caption" |
snippet |
OBJECT |
Basic details about a caption track, such as its language and name |
snippet.audioTrackType |
ENUMERATION |
The type of audio track associated with the caption track |
snippet.failureReason |
ENUMERATION |
The reason that YouTube failed to process the caption track. This property is only present if the state property's value is failed |
snippet.isAutoSynced |
BOOLEAN |
Indicates whether YouTube synchronized the caption track to the audio track in the video. The value will be true if a sync was explicitly requested when the caption track was uploaded. For example, when calling the captions.insert or captions.update methods, you can set the sync parameter to true to instruct YouTube to sync the uploaded track to the video. If the value is false, YouTube uses the time codes in the uploaded caption track to determine when to display captions |
snippet.isCC |
BOOLEAN |
Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false |
snippet.isDraft |
BOOLEAN |
Indicates whether the caption track is a draft. If the value is true, then the track is not publicly visible. The default value is false |
snippet.isEasyReader |
BOOLEAN |
Indicates whether caption track is formatted for "easy reader," meaning it is at a third-grade level for language learners. The default value is false |
snippet.isLarge |
BOOLEAN |
Indicates whether the caption track uses large text for the vision-impaired. The default value is false |
snippet.language |
STRING |
The language of the caption track. The property value is a BCP-47 language tag |
snippet.lastUpdated |
DATE_TIME |
The date and time when the caption track was last updated. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format |
snippet.name |
STRING |
The name of the caption track. The name is intended to be visible to the user as an option during playback |
snippet.status |
ENUMERATION |
The caption track's status |
snippet.trackKind |
ENUMERATION |
The caption track's type |
snippet.videoId |
STRING |
The ID that YouTube uses to uniquely identify the video associated with the caption track |
= Parameter name
= Format
part STRING Required The part parameter specifies the caption resource parts that the API response will include. Set the parameter value to snippet |
onBehalfOf STRING ID of the Google+ Page for the channel that the request is be on behalf of |
onBehalfOfContentOwner STRING Note: This parameter is intended exclusively for YouTube content partners. The onBehalfOfContentOwner parameter indicates that the request's authorization credentials identify a YouTube CMS user who is acting on behalf of the content owner specified in the parameter value. This parameter is intended for YouTube content partners that own and manage many different YouTube channels. It allows content owners to authenticate once and get access to all their video and channel data, without having to provide authentication credentials for each individual channel. The actual CMS account that the user authenticates with must be linked to the specified YouTube content owner |
sync BOOLEAN The sync parameter indicates whether YouTube should automatically synchronize the caption file with the audio track of the video. If you set the value to true, YouTube will disregard any time codes that are in the uploaded caption file and generate new time codes for the captions. You should set the sync parameter to true if you are uploading a transcript, which has no time codes, or if you suspect the time codes in your file are incorrect and want YouTube to try to fix them |
etag STRING Etag of this resource |
id STRING The ID that YouTube uses to uniquely identify the caption track |
kind STRING Identifies what kind of resource this is. Value: the fixed string "youtube#caption" |
snippet OBJECT Basic details about a caption track, such as its language and name |
snippet.audioTrackType ENUMERATION The type of audio track associated with the caption track |
snippet.failureReason ENUMERATION The reason that YouTube failed to process the caption track. This property is only present if the state property's value is failed |
snippet.isAutoSynced BOOLEAN Indicates whether YouTube synchronized the caption track to the audio track in the video. The value will be true if a sync was explicitly requested when the caption track was uploaded. For example, when calling the captions.insert or captions.update methods, you can set the sync parameter to true to instruct YouTube to sync the uploaded track to the video. If the value is false, YouTube uses the time codes in the uploaded caption track to determine when to display captions |
snippet.isCC BOOLEAN Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false |
snippet.isDraft BOOLEAN Indicates whether the caption track is a draft. If the value is true, then the track is not publicly visible. The default value is false |
snippet.isEasyReader BOOLEAN Indicates whether caption track is formatted for "easy reader," meaning it is at a third-grade level for language learners. The default value is false |
snippet.isLarge BOOLEAN Indicates whether the caption track uses large text for the vision-impaired. The default value is false |
snippet.language STRING The language of the caption track. The property value is a BCP-47 language tag |
snippet.lastUpdated DATE_TIME The date and time when the caption track was last updated. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format |
snippet.name STRING The name of the caption track. The name is intended to be visible to the user as an option during playback |
snippet.status ENUMERATION The caption track's status |
snippet.trackKind ENUMERATION The caption track's type |
snippet.videoId STRING The ID that YouTube uses to uniquely identify the video associated with the caption track |
Output
This building block provides 17 output parameters
Name | Format | Description |
---|---|---|
etag |
STRING |
Etag of this resource |
id |
STRING |
The ID that YouTube uses to uniquely identify the caption track |
kind |
STRING |
Identifies what kind of resource this is. Value: the fixed string "youtube#caption" |
snippet |
OBJECT |
Basic details about a caption track, such as its language and name |
snippet.audioTrackType |
ENUMERATION |
The type of audio track associated with the caption track |
snippet.failureReason |
ENUMERATION |
The reason that YouTube failed to process the caption track. This property is only present if the state property's value is failed |
snippet.isAutoSynced |
BOOLEAN |
Indicates whether YouTube synchronized the caption track to the audio track in the video. The value will be true if a sync was explicitly requested when the caption track was uploaded. For example, when calling the captions.insert or captions.update methods, you can set the sync parameter to true to instruct YouTube to sync the uploaded track to the video. If the value is false, YouTube uses the time codes in the uploaded caption track to determine when to display captions |
snippet.isCC |
BOOLEAN |
Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false |
snippet.isDraft |
BOOLEAN |
Indicates whether the caption track is a draft. If the value is true, then the track is not publicly visible. The default value is false |
snippet.isEasyReader |
BOOLEAN |
Indicates whether caption track is formatted for "easy reader," meaning it is at a third-grade level for language learners. The default value is false |
snippet.isLarge |
BOOLEAN |
Indicates whether the caption track uses large text for the vision-impaired. The default value is false |
snippet.language |
STRING |
The language of the caption track. The property value is a BCP-47 language tag |
snippet.lastUpdated |
DATE_TIME |
The date and time when the caption track was last updated. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format |
snippet.name |
STRING |
The name of the caption track. The name is intended to be visible to the user as an option during playback |
snippet.status |
ENUMERATION |
The caption track's status |
snippet.trackKind |
ENUMERATION |
The caption track's type |
snippet.videoId |
STRING |
The ID that YouTube uses to uniquely identify the video associated with the caption track |
= Parameter name
= Format
etag STRING Etag of this resource |
id STRING The ID that YouTube uses to uniquely identify the caption track |
kind STRING Identifies what kind of resource this is. Value: the fixed string "youtube#caption" |
snippet OBJECT Basic details about a caption track, such as its language and name |
snippet.audioTrackType ENUMERATION The type of audio track associated with the caption track |
snippet.failureReason ENUMERATION The reason that YouTube failed to process the caption track. This property is only present if the state property's value is failed |
snippet.isAutoSynced BOOLEAN Indicates whether YouTube synchronized the caption track to the audio track in the video. The value will be true if a sync was explicitly requested when the caption track was uploaded. For example, when calling the captions.insert or captions.update methods, you can set the sync parameter to true to instruct YouTube to sync the uploaded track to the video. If the value is false, YouTube uses the time codes in the uploaded caption track to determine when to display captions |
snippet.isCC BOOLEAN Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false |
snippet.isDraft BOOLEAN Indicates whether the caption track is a draft. If the value is true, then the track is not publicly visible. The default value is false |
snippet.isEasyReader BOOLEAN Indicates whether caption track is formatted for "easy reader," meaning it is at a third-grade level for language learners. The default value is false |
snippet.isLarge BOOLEAN Indicates whether the caption track uses large text for the vision-impaired. The default value is false |
snippet.language STRING The language of the caption track. The property value is a BCP-47 language tag |
snippet.lastUpdated DATE_TIME The date and time when the caption track was last updated. The value is specified in ISO 8601 (YYYY-MM-DDThh:mm:ss.sZ) format |
snippet.name STRING The name of the caption track. The name is intended to be visible to the user as an option during playback |
snippet.status ENUMERATION The caption track's status |
snippet.trackKind ENUMERATION The caption track's type |
snippet.videoId STRING The ID that YouTube uses to uniquely identify the video associated with the caption track |