1.0.1 • Published 3 years ago

youtube-uploader-js v1.0.1

Weekly downloads
-
License
WTFPL
Repository
github
Last release
3 years ago

youtube-uploader

A NodeJS library that uploads videos to youtube account

  • The method accepts a properties param, a success callback, and failure callback. the properties param is an object the can consist of the following:
PropertyDescription
CLIENT_ID*provided in google cloud console
CLIENT_SECRET*provided in google cloud console
REDIRECT_URL*The redirect URL you provided in google cloud console after consent screen
accessToken*from GCP oAuth2
refreshToken*from GCP oAuth2
title*The title of the video
media*readable Video stream
descriptionThe Description of the video
privacyStatusthe value can be either 'public' or 'private' video

Example

const accessToken="put accessToken here"
const refreshToken="put refreshToken here"
const media = fs.createReadStream("test.mp4")
const REDIRECT_URL="REDIRECT_URL here"
const CLIENT_ID="put CLIENT_ID here"
const CLIENT_SECRET="put CLIENT_SECRET here"
const title="test"
const description=""

youtubeUploader(
    {
    description,
    title,
    accessToken,
    refreshToken,
    CLIENT_ID,
    CLIENT_SECRET,
    REDIRECT_URL,
    media,
    },
    onSuccess,
    onError)