You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: javascript/README.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,21 +15,11 @@ client ID by registering your application in the
15
15
16
16
Description: This code sample demonstrates how to execute a resumable upload using XHR/CORS.
17
17
18
-
### [Upload a video](/youtube/api-samples/blob/master/javascript/upload_video.js)
19
-
20
-
Method: youtube.videos.insert<br>
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>
18
+
### [Create a playlist](/youtube/api-samples/blob/master/javascript/playlist_updates.js)
27
19
28
-
The HTML page uses JQuery, the <code>cors_upload.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.
20
+
Method: youtube.playlists.insert<br>
21
+
Description: This JavaScript code creates a private playlist and adds videos to that playlist. (You could, of course, modify the code so that it creates a publicly visible playlist or so that it checks a form value to determine whether the playlist is
22
+
public or private.) Note that you need to update the client ID in the <code>auth.js</code> file to run this code.<br><br>The HTML page uses JQuery, along with the <code>auth.js</code> and <code>playlist_updates.js</code> JavaScript files, to display a simple form for adding videos to the playlist.
33
23
34
24
### [Retrieve my uploads](/youtube/api-samples/blob/master/javascript/my_uploads.js)
Description: This code sample calls the API's <code>search.list</code> method to retrieve search results associated
51
41
with a particular keyword. The HTML page uses JQuery, along with the <code>auth.js</code> and <code>search.js</code> JavaScript files, to show a simple search form and display the list of search results.
52
42
53
-
### [Create a playlist](/youtube/api-samples/blob/master/javascript/playlist_updates.js)
43
+
### [Upload a video](/youtube/api-samples/blob/master/javascript/upload_video.js)
54
44
55
-
Method: youtube.playlists.insert<br>
56
-
Description: This JavaScript code creates a private playlist and adds videos to that playlist. (You could, of course, modify the code so that it creates a publicly visible playlist or so that it checks a form value to determine whether the playlist is
57
-
public or private.) Note that you need to update the client ID in the <code>auth.js</code> file to run this code.<br><br>The HTML page uses JQuery, along with the <code>auth.js</code> and <code>playlist_updates.js</code> JavaScript files, to display a simple form for adding videos to the playlist.
45
+
Method: youtube.videos.insert<br>
46
+
Description: This JavaScript sample performs the following functions:<br>
47
+
<ol>
48
+
<li>It retrieves the channel name and thumbnail of the authenticated user's channel using the API's channels.list method.</li>
49
+
<li>It handles the video upload to YouTube using the resumable upload protocol.</li>
50
+
<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>
51
+
</ol>
52
+
53
+
The HTML page uses JQuery, the <code>cors_upload.js</code> and <code>upload_video.js</code> JavaScript files, and the
54
+
<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
55
+
with your project's client ID. The only valid JavaScript origin for the client ID in the sample code is
56
+
<code>http://localhost</code>. This means that you could test the sample locally, but it would not work in your
57
+
production application.
58
58
59
59
### [Calling the Analytics API](/youtube/api-samples/blob/master/javascript/analytics_codelab.js)
0 commit comments