gpt4 book ai didi

youtube-livestreaming-api - 如何从 StreamNow 默认广播中获取流将成为(之后)的视频的 videoId?

转载 作者:行者123 更新时间:2023-12-04 08:44:45 26 4
gpt4 key购买 nike

使用 YouTube Stream Now API 是否有任何方法可以获取默认流将被上传为 (NOT DEFAULT STREAM ID) 的视频 ID,因此您可以创建一个 url 来播放它... youtube.com/watch ?v=

最佳答案

根据 youtube 网站上提供的定义,liveStream 和 LiveBroadcast 是不同的东西。因此,他们的 ID 也应该不同。

LiveStreams

A liveStream resource contains information about the video stream that you are transmitting to YouTube. The stream provides the content that will be broadcast to YouTube users. Once created, a liveStream resource can be bound to one or more liveBroadcast resources.



使用 stream.getId()您可以获取视频流的 ID

link 中的示例代码给出如何使用它的想法

LiveBroadcasts

A liveBroadcast resource represents an event that will be streamed, via live video, on YouTube.



使用 returnedBroadcast.getId().getId()你可以得到广播的ID

link 中的示例代码给出如何使用它的想法

查看 Try It部分原因在于有 streamId,您可以在其中指定可以与广播绑定(bind)的视频。

关于youtube-livestreaming-api - 如何从 StreamNow 默认广播中获取流将成为(之后)的视频的 videoId?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39358914/

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