如何使用 YouTube API 将视频设置为“私密共享”?

问题描述 投票:0回答:1
I'm uploading videos privately with the YouTube API.

Additionally, I want to set up private internal sharing.

I can do it from the screen, but I want to do it with the API.

If there is any way, please let me know.

thank you.

java - 如何使用 v3 YouTube API 将视频设置为“私有但共享”? - Stack Overflow 如何使用 v3 YouTube API 将视频设置为“私有但共享”?

i'm having a similar problem. What is the issue now?
I'm uploading videos privately with the YouTube API.

Additionally, I want to set up private internal sharing.
youtube-data-api
1个回答
0
投票

我就是这样做的:

  // Add extra information to the video before uploading.
  Video videoObjectDefiningMetadata = new Video();

  // Default is to be publicly visible.
  VideoStatus status = new VideoStatus();
  status.setPrivacyStatus("private");
  videoObjectDefiningMetadata.setStatus(status);

  ...

  YouTube.Videos.Insert videoInsert = getYoutube().videos()
    .insert(Arrays.asList("snippet","statistics","status"), videoObjectDefiningMetadata, mediaContent);
© www.soinside.com 2019 - 2024. All rights reserved.