【发布时间】:2017-08-02 17:20:16
【问题描述】:
我想通过他们的 api 在 Youtube 上上传视频,但我找不到我需要设置的字段来通知 youtube 视频有 paid product placements 这是我的代码:
Youtube.videos.insert({
resource: {
// Video title and description
snippet: {
title: "Testing YoutTube API NodeJS module",
description: "Test video upload via YouTube API",
tags: ["music"],
defaultLanguage: "en"
},
// I don't want to spam my subscribers
status: {
privacyStatus: "private"
}
}
// This is for the callback function
, part: "snippet,status"
// Create the readable stream to upload the video
, media: {
body: fs.createReadStream(video_path)
}
}, (err, data) => {
if (err) {
console.log(err);
}
else {
console.log("Done.");
}
});
您可以找到上传视频时可以设置的所有字段的说明here。
【问题讨论】:
标签: javascript node.js video youtube youtube-api