gpt4 book ai didi

javascript - YouTube API上传视频并设置付费产品展示位置字段

转载 作者:行者123 更新时间:2023-12-03 06:17:00 24 4
gpt4 key购买 nike

我想通过他们的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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com