blob: bd530be3fe7f83e52ad17944238f75bc222ee58e [file] [log] [blame]
Nathaniel Manista4f877e52015-06-15 16:44:50 +00001<html><body>
2<style>
3
4body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13}
14
15body {
16 font-size: 13px;
17 padding: 1em;
18}
19
20h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23}
24
25h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28}
29
30h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34}
35
36pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39}
40
41pre {
42 margin-top: 0.5em;
43}
44
45h1, h2, h3, p {
46 font-family: Arial, sans serif;
47}
48
49h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51}
52
53.toc_element {
54 margin-top: 0.5em;
55}
56
57.firstline {
58 margin-left: 2 em;
59}
60
61.method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66}
67
68.details {
69 font-weight: bold;
70 font-size: 14px;
71}
72
73</style>
74
75<h1><a href="youtube_v3.html">YouTube Data API</a> . <a href="youtube_v3.captions.html">captions</a></h1>
76<h2>Instance Methods</h2>
77<p class="toc_element">
Takashi Matsuo06694102015-09-11 13:55:40 -070078 <code><a href="#delete">delete(id, onBehalfOf=None, onBehalfOfContentOwner=None)</a></code></p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000079<p class="firstline">Deletes a specified caption track.</p>
80<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070081 <code><a href="#download">download(id, onBehalfOf=None, onBehalfOfContentOwner=None, tfmt=None, tlang=None)</a></code></p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000082<p class="firstline">Downloads a caption track. The caption track is returned in its original format unless the request specifies a value for the tfmt parameter and in its original language unless the request specifies a value for the tlang parameter.</p>
83<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070084 <code><a href="#download_media">download_media(id, onBehalfOf=None, onBehalfOfContentOwner=None, tfmt=None, tlang=None)</a></code></p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000085<p class="firstline">Downloads a caption track. The caption track is returned in its original format unless the request specifies a value for the tfmt parameter and in its original language unless the request specifies a value for the tlang parameter.</p>
86<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070087 <code><a href="#insert">insert(part, body=None, onBehalfOf=None, onBehalfOfContentOwner=None, sync=None, media_body=None, media_mime_type=None)</a></code></p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000088<p class="firstline">Uploads a caption track.</p>
89<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070090 <code><a href="#list">list(part, videoId, id=None, onBehalfOf=None, onBehalfOfContentOwner=None)</a></code></p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000091<p class="firstline">Returns a list of caption tracks that are associated with a specified video. Note that the API response does not contain the actual captions and that the captions.download method provides the ability to retrieve a caption track.</p>
92<p class="toc_element">
Bu Sun Kim65020912020-05-20 12:08:20 -070093 <code><a href="#update">update(part, body=None, onBehalfOf=None, onBehalfOfContentOwner=None, sync=None, media_body=None, media_mime_type=None)</a></code></p>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000094<p class="firstline">Updates a caption track. When updating a caption track, you can change the track's draft status, upload a new caption file for the track, or both.</p>
95<h3>Method Details</h3>
96<div class="method">
Takashi Matsuo06694102015-09-11 13:55:40 -070097 <code class="details" id="delete">delete(id, onBehalfOf=None, onBehalfOfContentOwner=None)</code>
Nathaniel Manista4f877e52015-06-15 16:44:50 +000098 <pre>Deletes a specified caption track.
99
100Args:
101 id: string, The id parameter identifies the caption track that is being deleted. The value is a caption track ID as identified by the id property in a caption resource. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700102 onBehalfOf: string, ID of the Google+ Page for the channel that the request is be on behalf of
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000103 onBehalfOfContentOwner: string, Note: This parameter is intended exclusively for YouTube content partners.
104
Bu Sun Kim65020912020-05-20 12:08:20 -0700105The onBehalfOfContentOwner parameter indicates that the request&#x27;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.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000106</pre>
107</div>
108
109<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700110 <code class="details" id="download">download(id, onBehalfOf=None, onBehalfOfContentOwner=None, tfmt=None, tlang=None)</code>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000111 <pre>Downloads a caption track. The caption track is returned in its original format unless the request specifies a value for the tfmt parameter and in its original language unless the request specifies a value for the tlang parameter.
112
113Args:
114 id: string, The id parameter identifies the caption track that is being retrieved. The value is a caption track ID as identified by the id property in a caption resource. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700115 onBehalfOf: string, ID of the Google+ Page for the channel that the request is be on behalf of
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000116 onBehalfOfContentOwner: string, Note: This parameter is intended exclusively for YouTube content partners.
117
Bu Sun Kim65020912020-05-20 12:08:20 -0700118The onBehalfOfContentOwner parameter indicates that the request&#x27;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.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000119 tfmt: string, The tfmt parameter specifies that the caption track should be returned in a specific format. If the parameter is not included in the request, the track is returned in its original format.
120 Allowed values
121 sbv - SubViewer subtitle.
122 scc - Scenarist Closed Caption format.
123 srt - SubRip subtitle.
124 ttml - Timed Text Markup Language caption.
125 vtt - Web Video Text Tracks caption.
Bu Sun Kim65020912020-05-20 12:08:20 -0700126 tlang: string, The tlang parameter specifies that the API response should return a translation of the specified caption track. The parameter value is an ISO 639-1 two-letter language code that identifies the desired caption language. The translation is generated by using machine translation, such as Google Translate.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000127</pre>
128</div>
129
130<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700131 <code class="details" id="download_media">download_media(id, onBehalfOf=None, onBehalfOfContentOwner=None, tfmt=None, tlang=None)</code>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000132 <pre>Downloads a caption track. The caption track is returned in its original format unless the request specifies a value for the tfmt parameter and in its original language unless the request specifies a value for the tlang parameter.
133
134Args:
135 id: string, The id parameter identifies the caption track that is being retrieved. The value is a caption track ID as identified by the id property in a caption resource. (required)
Takashi Matsuo06694102015-09-11 13:55:40 -0700136 onBehalfOf: string, ID of the Google+ Page for the channel that the request is be on behalf of
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000137 onBehalfOfContentOwner: string, Note: This parameter is intended exclusively for YouTube content partners.
138
Bu Sun Kim65020912020-05-20 12:08:20 -0700139The onBehalfOfContentOwner parameter indicates that the request&#x27;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.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000140 tfmt: string, The tfmt parameter specifies that the caption track should be returned in a specific format. If the parameter is not included in the request, the track is returned in its original format.
141 Allowed values
142 sbv - SubViewer subtitle.
143 scc - Scenarist Closed Caption format.
144 srt - SubRip subtitle.
145 ttml - Timed Text Markup Language caption.
146 vtt - Web Video Text Tracks caption.
Bu Sun Kim65020912020-05-20 12:08:20 -0700147 tlang: string, The tlang parameter specifies that the API response should return a translation of the specified caption track. The parameter value is an ISO 639-1 two-letter language code that identifies the desired caption language. The translation is generated by using machine translation, such as Google Translate.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000148</pre>
149</div>
150
151<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700152 <code class="details" id="insert">insert(part, body=None, onBehalfOf=None, onBehalfOfContentOwner=None, sync=None, media_body=None, media_mime_type=None)</code>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000153 <pre>Uploads a caption track.
154
155Args:
156 part: string, The part parameter specifies the caption resource parts that the API response will include. Set the parameter value to snippet. (required)
157 body: object, The request body.
158 The object takes the form of:
159
160{ # A caption resource represents a YouTube caption track. A caption track is associated with exactly one YouTube video.
Bu Sun Kim65020912020-05-20 12:08:20 -0700161 &quot;etag&quot;: &quot;A String&quot;, # Etag of this resource.
162 &quot;id&quot;: &quot;A String&quot;, # The ID that YouTube uses to uniquely identify the caption track.
163 &quot;kind&quot;: &quot;youtube#caption&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;youtube#caption&quot;.
164 &quot;snippet&quot;: { # Basic details about a caption track, such as its language and name. # The snippet object contains basic details about the caption.
165 &quot;audioTrackType&quot;: &quot;A String&quot;, # The type of audio track associated with the caption track.
166 &quot;failureReason&quot;: &quot;A String&quot;, # The reason that YouTube failed to process the caption track. This property is only present if the state property&#x27;s value is failed.
167 &quot;isAutoSynced&quot;: True or False, # 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.
168 &quot;isCC&quot;: True or False, # Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false.
169 &quot;isDraft&quot;: True or False, # 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.
170 &quot;isEasyReader&quot;: True or False, # Indicates whether caption track is formatted for &quot;easy reader,&quot; meaning it is at a third-grade level for language learners. The default value is false.
171 &quot;isLarge&quot;: True or False, # Indicates whether the caption track uses large text for the vision-impaired. The default value is false.
172 &quot;language&quot;: &quot;A String&quot;, # The language of the caption track. The property value is a BCP-47 language tag.
173 &quot;lastUpdated&quot;: &quot;A String&quot;, # 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.
174 &quot;name&quot;: &quot;A String&quot;, # The name of the caption track. The name is intended to be visible to the user as an option during playback.
175 &quot;status&quot;: &quot;A String&quot;, # The caption track&#x27;s status.
176 &quot;trackKind&quot;: &quot;A String&quot;, # The caption track&#x27;s type.
177 &quot;videoId&quot;: &quot;A String&quot;, # The ID that YouTube uses to uniquely identify the video associated with the caption track.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000178 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000179 }
180
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000181 onBehalfOf: string, ID of the Google+ Page for the channel that the request is be on behalf of
Bu Sun Kim65020912020-05-20 12:08:20 -0700182 onBehalfOfContentOwner: string, Note: This parameter is intended exclusively for YouTube content partners.
183
184The onBehalfOfContentOwner parameter indicates that the request&#x27;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.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000185 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.
186
187You 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.
Bu Sun Kim65020912020-05-20 12:08:20 -0700188 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
189 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000190
191Returns:
192 An object of the form:
193
194 { # A caption resource represents a YouTube caption track. A caption track is associated with exactly one YouTube video.
Bu Sun Kim65020912020-05-20 12:08:20 -0700195 &quot;etag&quot;: &quot;A String&quot;, # Etag of this resource.
196 &quot;id&quot;: &quot;A String&quot;, # The ID that YouTube uses to uniquely identify the caption track.
197 &quot;kind&quot;: &quot;youtube#caption&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;youtube#caption&quot;.
198 &quot;snippet&quot;: { # Basic details about a caption track, such as its language and name. # The snippet object contains basic details about the caption.
199 &quot;audioTrackType&quot;: &quot;A String&quot;, # The type of audio track associated with the caption track.
200 &quot;failureReason&quot;: &quot;A String&quot;, # The reason that YouTube failed to process the caption track. This property is only present if the state property&#x27;s value is failed.
201 &quot;isAutoSynced&quot;: True or False, # 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.
202 &quot;isCC&quot;: True or False, # Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false.
203 &quot;isDraft&quot;: True or False, # 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.
204 &quot;isEasyReader&quot;: True or False, # Indicates whether caption track is formatted for &quot;easy reader,&quot; meaning it is at a third-grade level for language learners. The default value is false.
205 &quot;isLarge&quot;: True or False, # Indicates whether the caption track uses large text for the vision-impaired. The default value is false.
206 &quot;language&quot;: &quot;A String&quot;, # The language of the caption track. The property value is a BCP-47 language tag.
207 &quot;lastUpdated&quot;: &quot;A String&quot;, # 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.
208 &quot;name&quot;: &quot;A String&quot;, # The name of the caption track. The name is intended to be visible to the user as an option during playback.
209 &quot;status&quot;: &quot;A String&quot;, # The caption track&#x27;s status.
210 &quot;trackKind&quot;: &quot;A String&quot;, # The caption track&#x27;s type.
211 &quot;videoId&quot;: &quot;A String&quot;, # The ID that YouTube uses to uniquely identify the video associated with the caption track.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000212 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000213 }</pre>
214</div>
215
216<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700217 <code class="details" id="list">list(part, videoId, id=None, onBehalfOf=None, onBehalfOfContentOwner=None)</code>
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000218 <pre>Returns a list of caption tracks that are associated with a specified video. Note that the API response does not contain the actual captions and that the captions.download method provides the ability to retrieve a caption track.
219
220Args:
221 part: string, The part parameter specifies a comma-separated list of one or more caption resource parts that the API response will include. The part names that you can include in the parameter value are id and snippet. (required)
222 videoId: string, The videoId parameter specifies the YouTube video ID of the video for which the API should return caption tracks. (required)
Bu Sun Kim65020912020-05-20 12:08:20 -0700223 id: string, The id parameter specifies a comma-separated list of IDs that identify the caption resources that should be retrieved. Each ID must identify a caption track associated with the specified video.
Takashi Matsuo06694102015-09-11 13:55:40 -0700224 onBehalfOf: string, ID of the Google+ Page for the channel that the request is on behalf of.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000225 onBehalfOfContentOwner: string, Note: This parameter is intended exclusively for YouTube content partners.
226
Bu Sun Kim65020912020-05-20 12:08:20 -0700227The onBehalfOfContentOwner parameter indicates that the request&#x27;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.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000228
229Returns:
230 An object of the form:
231
232 {
Bu Sun Kim65020912020-05-20 12:08:20 -0700233 &quot;etag&quot;: &quot;A String&quot;, # Etag of this resource.
234 &quot;eventId&quot;: &quot;A String&quot;, # Serialized EventId of the request which produced this response.
235 &quot;items&quot;: [ # A list of captions that match the request criteria.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000236 { # A caption resource represents a YouTube caption track. A caption track is associated with exactly one YouTube video.
Bu Sun Kim65020912020-05-20 12:08:20 -0700237 &quot;etag&quot;: &quot;A String&quot;, # Etag of this resource.
238 &quot;id&quot;: &quot;A String&quot;, # The ID that YouTube uses to uniquely identify the caption track.
239 &quot;kind&quot;: &quot;youtube#caption&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;youtube#caption&quot;.
240 &quot;snippet&quot;: { # Basic details about a caption track, such as its language and name. # The snippet object contains basic details about the caption.
241 &quot;audioTrackType&quot;: &quot;A String&quot;, # The type of audio track associated with the caption track.
242 &quot;failureReason&quot;: &quot;A String&quot;, # The reason that YouTube failed to process the caption track. This property is only present if the state property&#x27;s value is failed.
243 &quot;isAutoSynced&quot;: True or False, # 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.
244 &quot;isCC&quot;: True or False, # Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false.
245 &quot;isDraft&quot;: True or False, # 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.
246 &quot;isEasyReader&quot;: True or False, # Indicates whether caption track is formatted for &quot;easy reader,&quot; meaning it is at a third-grade level for language learners. The default value is false.
247 &quot;isLarge&quot;: True or False, # Indicates whether the caption track uses large text for the vision-impaired. The default value is false.
248 &quot;language&quot;: &quot;A String&quot;, # The language of the caption track. The property value is a BCP-47 language tag.
249 &quot;lastUpdated&quot;: &quot;A String&quot;, # 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.
250 &quot;name&quot;: &quot;A String&quot;, # The name of the caption track. The name is intended to be visible to the user as an option during playback.
251 &quot;status&quot;: &quot;A String&quot;, # The caption track&#x27;s status.
252 &quot;trackKind&quot;: &quot;A String&quot;, # The caption track&#x27;s type.
253 &quot;videoId&quot;: &quot;A String&quot;, # The ID that YouTube uses to uniquely identify the video associated with the caption track.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000254 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000255 },
256 ],
Bu Sun Kim65020912020-05-20 12:08:20 -0700257 &quot;kind&quot;: &quot;youtube#captionListResponse&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;youtube#captionListResponse&quot;.
258 &quot;visitorId&quot;: &quot;A String&quot;, # The visitorId identifies the visitor.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000259 }</pre>
260</div>
261
262<div class="method">
Bu Sun Kim65020912020-05-20 12:08:20 -0700263 <code class="details" id="update">update(part, body=None, onBehalfOf=None, onBehalfOfContentOwner=None, sync=None, media_body=None, media_mime_type=None)</code>
264 <pre>Updates a caption track. When updating a caption track, you can change the track&#x27;s draft status, upload a new caption file for the track, or both.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000265
266Args:
Bu Sun Kim65020912020-05-20 12:08:20 -0700267 part: string, The part parameter serves two purposes in this operation. It identifies the properties that the write operation will set as well as the properties that the API response will include. Set the property value to snippet if you are updating the track&#x27;s draft status. Otherwise, set the property value to id. (required)
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000268 body: object, The request body.
269 The object takes the form of:
270
271{ # A caption resource represents a YouTube caption track. A caption track is associated with exactly one YouTube video.
Bu Sun Kim65020912020-05-20 12:08:20 -0700272 &quot;etag&quot;: &quot;A String&quot;, # Etag of this resource.
273 &quot;id&quot;: &quot;A String&quot;, # The ID that YouTube uses to uniquely identify the caption track.
274 &quot;kind&quot;: &quot;youtube#caption&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;youtube#caption&quot;.
275 &quot;snippet&quot;: { # Basic details about a caption track, such as its language and name. # The snippet object contains basic details about the caption.
276 &quot;audioTrackType&quot;: &quot;A String&quot;, # The type of audio track associated with the caption track.
277 &quot;failureReason&quot;: &quot;A String&quot;, # The reason that YouTube failed to process the caption track. This property is only present if the state property&#x27;s value is failed.
278 &quot;isAutoSynced&quot;: True or False, # 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.
279 &quot;isCC&quot;: True or False, # Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false.
280 &quot;isDraft&quot;: True or False, # 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.
281 &quot;isEasyReader&quot;: True or False, # Indicates whether caption track is formatted for &quot;easy reader,&quot; meaning it is at a third-grade level for language learners. The default value is false.
282 &quot;isLarge&quot;: True or False, # Indicates whether the caption track uses large text for the vision-impaired. The default value is false.
283 &quot;language&quot;: &quot;A String&quot;, # The language of the caption track. The property value is a BCP-47 language tag.
284 &quot;lastUpdated&quot;: &quot;A String&quot;, # 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.
285 &quot;name&quot;: &quot;A String&quot;, # The name of the caption track. The name is intended to be visible to the user as an option during playback.
286 &quot;status&quot;: &quot;A String&quot;, # The caption track&#x27;s status.
287 &quot;trackKind&quot;: &quot;A String&quot;, # The caption track&#x27;s type.
288 &quot;videoId&quot;: &quot;A String&quot;, # The ID that YouTube uses to uniquely identify the video associated with the caption track.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000289 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000290 }
291
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000292 onBehalfOf: string, ID of the Google+ Page for the channel that the request is be on behalf of
Bu Sun Kim65020912020-05-20 12:08:20 -0700293 onBehalfOfContentOwner: string, Note: This parameter is intended exclusively for YouTube content partners.
294
295The onBehalfOfContentOwner parameter indicates that the request&#x27;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.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000296 sync: boolean, Note: The API server only processes the parameter value if the request contains an updated caption file.
297
298The 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 automatically synchronize the caption track with the audio track.
Bu Sun Kim65020912020-05-20 12:08:20 -0700299 media_body: string, The filename of the media request body, or an instance of a MediaUpload object.
300 media_mime_type: string, The MIME type of the media request body, or an instance of a MediaUpload object.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000301
302Returns:
303 An object of the form:
304
305 { # A caption resource represents a YouTube caption track. A caption track is associated with exactly one YouTube video.
Bu Sun Kim65020912020-05-20 12:08:20 -0700306 &quot;etag&quot;: &quot;A String&quot;, # Etag of this resource.
307 &quot;id&quot;: &quot;A String&quot;, # The ID that YouTube uses to uniquely identify the caption track.
308 &quot;kind&quot;: &quot;youtube#caption&quot;, # Identifies what kind of resource this is. Value: the fixed string &quot;youtube#caption&quot;.
309 &quot;snippet&quot;: { # Basic details about a caption track, such as its language and name. # The snippet object contains basic details about the caption.
310 &quot;audioTrackType&quot;: &quot;A String&quot;, # The type of audio track associated with the caption track.
311 &quot;failureReason&quot;: &quot;A String&quot;, # The reason that YouTube failed to process the caption track. This property is only present if the state property&#x27;s value is failed.
312 &quot;isAutoSynced&quot;: True or False, # 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.
313 &quot;isCC&quot;: True or False, # Indicates whether the track contains closed captions for the deaf and hard of hearing. The default value is false.
314 &quot;isDraft&quot;: True or False, # 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.
315 &quot;isEasyReader&quot;: True or False, # Indicates whether caption track is formatted for &quot;easy reader,&quot; meaning it is at a third-grade level for language learners. The default value is false.
316 &quot;isLarge&quot;: True or False, # Indicates whether the caption track uses large text for the vision-impaired. The default value is false.
317 &quot;language&quot;: &quot;A String&quot;, # The language of the caption track. The property value is a BCP-47 language tag.
318 &quot;lastUpdated&quot;: &quot;A String&quot;, # 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.
319 &quot;name&quot;: &quot;A String&quot;, # The name of the caption track. The name is intended to be visible to the user as an option during playback.
320 &quot;status&quot;: &quot;A String&quot;, # The caption track&#x27;s status.
321 &quot;trackKind&quot;: &quot;A String&quot;, # The caption track&#x27;s type.
322 &quot;videoId&quot;: &quot;A String&quot;, # The ID that YouTube uses to uniquely identify the video associated with the caption track.
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000323 },
Nathaniel Manista4f877e52015-06-15 16:44:50 +0000324 }</pre>
325</div>
326
327</body></html>