我想通过他们的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时可以设置的所有字段的说明。
最佳答案
API中尚无视频资源的产品展示位置属性。如果您检查video properties,则没有提及。
关于javascript - YouTube API上传视频并设置付费产品展示位置字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42750982/