I need upload a video on youtube, following this link https://developers. google.com/youtube/v3/guides/ using_resumable_upload_ protocol##Start_Resumable_ Session
we can upload a resumable video.
Unfortunally this method doesn't work with ai2 because web component hasn't access at header parameters.
Someone know how do?
we already talked about that, see your other thread https://groups.google. com/d/msg/mitappinventortest/ 73_Yvbthu08/TJVHILONDAAJ
-- you might want to create your own web extension and add the response header as parameter in the web.gottext event
more information about how to create an extension see here https://groups.google.com/d/msg/mitappinventortest/Ip2A X036d0U/5NJlAEbFCgAJhowever that will be more advanced and will require some Java skills...
but I asked about a direct upload, the previous was to a resumable upload.
--
which means, you are talking about this https://developers. google.com/youtube/v3/docs/ videos/insert
it seems to be, up to now nobody tried this...
you first can try the Google OAuth Playground https://developers.google.com/ oauthplayground and find out, if you will be able to upload a video using the playground
you will have to work with OAuth, which is a little bit complicated...
for the OAuth part, probably my Google Drive example can help https://puravidaapps.com/ drive.php
--
I know Google OAuth Playground, let me say that it doesn't work (confirmed by post on GAS Forum). Anyway I know OAuth and I've already implemented it with success. So, how I've written in the past I was implementing a resumable upload video, but with ai2 we can't do ( I'm not able to develope java and use extension).
For this reason I asked if someone know how do a direct upload. Maybe your google drive snippet include this part, unfortunately there isn't a lot (visible) about how do the upload after the OAuth process.
If you can show me more snippet after OAuth could be a good base to find a solution.
I know Google OAuth Playground, let me say that it doesn't work (confirmed by post on GAS Forum)
you might want to provide a link to your post in the the GAS forum
Anyway I know OAuth and I've already implemented it with success.
the Drive example only will help with OAuth, You said, you already implemented OAuth with success, so you do not need the Drive example anymore.
For this reason I asked if someone know how do a direct upload.
you will have to follow the documentation https:// developers.google.com/youtube/ v3/docs/videos/insert and try something...
let us know about your progress
your link https://developers. google.com/youtube/v3/docs/ videos/insert hasn't a simple example to me, anyway using
POST /upload/youtube/v3/videos?uplo adType=part=snippet,status,con tentDetails HTTP/1.1
Host: www.googleapis.comAuthorization: Bearer AUTH_TOKEN
Content-Length: 278
Content-Type: application/json; charset=UTF-8
X-Upload-Content-Length: 3000000
X-Upload-Content-Type: video/*
{
"snippet": {
"title": "My video title",
"description": "This is a description of my video",
"tags": ["cool", "video", "more keywords"],
"categoryId": 22
},
"status": {
"privacyStatus": "public",
"embeddable": True,
"license": "youtube"
}
}
I've this answer
HTTP/1.1 200 OK
Alternate-protocol: 443:quic
Content-length: 1100
Expires: Fri, 01 Jan 1990 00:00:00 GMT
Vary: Origin, X-Origin
Server: UploadServer
Date: Sun, 03 Apr 2016 22:09:21 GMT
Etag: " yyyyyyyyyyyyyyyyyyyyyyyyyyyyyy y"
Pragma: no-cache
Cache-control: no-cache, no-store, max-age=0, must-revalidate
X-guploader-uploadid: XXXXXXXXXXXXXXXXXXX......
Alt-svc: quic=":443"; ma=2592000; v="32,31,30,29,28,27,26,25"
Content-type: application/json; charset=UTF-8
X-goog-correlation-id: aaaaaaaaaaa
{
"status": {
"publicStatsViewable": true,
"privacyStatus": "public",
"uploadStatus": "uploaded",
"license": "youtube",
"embeddable": true
},
"kind": "youtube#video",
"contentDetails": {
"duration": "PT0S",
"definition": "sd",
"licensedContent": false,
"dimension": "2d",
"caption": "false"
},
"snippet": {
"thumbnails": {
"default": {
"url": "https://i.ytimg.com/vi/ AAAAAAAAAAA/default.jpg",
"width": 120,
"height": 90
},
"high": {
"url": "https://i.ytimg.com/vi/ AAAAAAAAAAA/hqdefault.jpg",
"width": 480,
"height": 360
},
"medium": {
"url": "https://i.ytimg.com/vi/ AAAAAAAAAAA/mqdefault.jpg",
"width": 320,
"height": 180
}
},
"title": "unknown",
"channelId": "ZZZZZZZZZZZZZZZZZZZ",
"publishedAt": "2016-04-03T22:09:20.000Z",
"liveBroadcastContent": "none",
"channelTitle": "name.....",
"categoryId": "22",
"localized": {
"description": "",
"title": "unknown"
},
"description": ""
},
"etag": "\" hhhhhhhhhhhhhhhhhhhhhhhhhhhhhh hhhhhh\"",
"id": "aaaaaaaaaaa"
}
but now I don't know what do.
--
댓글 없음:
댓글 쓰기