【问题标题】:Youtube api upload video and set paid product placement fieldYoutube api 上传视频并设置付费植入字段
【发布时间】: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


    【解决方案1】:

    API 中还没有视频资源的产品展示位置属性。如果您检查video properties,则没有提及。

    【讨论】:

      猜你喜欢
      • 2013-03-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-08
      • 2015-11-19
      • 2014-05-25
      • 1970-01-01
      • 2018-05-26
      相关资源
      最近更新 更多