Skip to content

Commit 0ac71e3

Browse files
Add description of upload_video.html
1 parent 2b34949 commit 0ac71e3

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

javascript/README.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,18 @@ Description: This code sample demonstrates how to execute a resumable upload usi
1818
### [Upload a video](/youtube/api-samples/blob/master/javascript/upload_video.js)
1919

2020
Method: youtube.videos.insert<br>
21-
Description: This code sample calls the API's <code>videos.insert</code> method to upload a video to the channel
22-
associated with the request.
21+
Description: This JavaScript sample performs the following functions:<br>
22+
<ol>
23+
<li>It retrieves the channel name and thumbnail of the authenticated user's channel using the API's channels.list method.</li>
24+
<li>It handles the video upload to YouTube using the resumable upload protocol.</li>
25+
<li>It polls for the uploaded video's upload and processing status using the API's videos.list method by setting the part parameter value to status.</li>
26+
</ol><br>
27+
28+
The HTML page uses JQuery, the <code>plusone.js</code> and <code>upload_video.js</code> JavaScript files, and the
29+
<code>upload_video.css</code> file to upload a video file to YouTube.<br><br>Note that if you use this code in your own application, you must replace the value of the <code>data-clientid</code> attribute in the code for the Sign-In Button
30+
with your project's client ID. The only valid JavaScript origin for the client ID in the sample code is
31+
<code>http://localhost</code>. This means that you could test the sample locally, but it would not work in your
32+
production application.
2333

2434
### [Retrieve my uploads](/youtube/api-samples/blob/master/javascript/my_uploads.js)
2535

0 commit comments

Comments
 (0)