YoutubeProvider
Summary
Defines a YoutubeProvider class to interact with youtube platform.
Constructor
YoutubeProvider
Syntax
YoutubeProvider
-
providerConf
-
googleOAuthHelper
Summary
Parameters:
-
providerConf
ObjectA youtube configuration object
-
googleOAuthHelper
GoogleOAuthHelperThe Google OAuth helper
Item Index
Properties
Methods
getMediaInfo
Syntax
getMediaInfo
-
mediaId
-
callback
Summary
Gets information about a media hosted by Youtube.
remove
Syntax
remove
-
mediaIds
-
callback
Summary
Removes a media from the Youtube platform.
update
Syntax
update
-
media
-
data
-
force
-
callback
Summary
Updates a media resources on the platform.
If media has several resources on the platform, the same update will be performed for all resources. Actually only the media title is synchronized with Youtube.
Parameters:
-
media
ObjectThe media
-
mediaId
ArrayThe list of media resource ids
-
-
data
ObjectThe datas to update
-
[title]
String optionalThe media title. Be careful only the first 100 characters will be used, also "less than" and "greater than" characters will be removed
-
-
force
Booleantrue to force the update even if title hasn't changed, false otherwise
-
callback
FunctionThe function to call when it's done
- Error The error if an error occurred, null otherwise
upload
Syntax
upload
-
mediaFilePath
-
callback
Summary
Uploads a media to the Youtube platform.
uploadClassic
Syntax
uploadClassic
-
mediaFilePath
-
uploadParams
-
callback
Summary
Uploads to Youtube in the classic way, using Youtube API.
uploadResumable
Syntax
uploadResumable
-
mediaFilePath
-
uploadParams
-
callback
Summary
Uploads to Youtube in a fail safe way, using resumable uploads.
The upload can fail 3 times before failing globally, each times it fails it perform an upload again starting where it previously failed (ie: not re-uploading all the media)
Properties
googleOAuthHelper
Syntax
googleOAuthHelper
GoogleOAuthHelper
Summary
The Google OAuth Helper to use to connect to Google APIs.
privacy
Syntax
privacy
String
Summary
Privacy to apply to uploaded medias either public, private or unlisted.
uploadMethod
Syntax
uploadMethod
String
Summary
Youtube upload method, uploadClassic or uploadResumable.