gpt4 book ai didi

youtube - 如何获取 youtube live api 流 key

转载 作者:行者123 更新时间:2023-12-03 06:09:44 26 4
gpt4 key购买 nike

如何绑定(bind)我的 YouTube 流 key 以匹配以前的视频。
我正在尝试使用java来做到这一点,但没有得到任何地方。

我正在查看为创建广播流而给出的示例,但它没有保持相同的 key 。

最佳答案

我以前得到过这方面的帮助。请尝试在 Google 上进行一些研究,然后提出问题。可以看How can I change the stream my event uses via the YouTube live api? .这会像对我一样帮助你。

简而言之,这是我收到的帮助代码。

Credit to @M. Prokhorov


YouTube yt = ...         // your reference to YouTube
String broadcastId = ... // your broadcast Id

String newStreamId = ... // identifier of stream you want to bind
String apiKEy = ... // your API key

// you can define other response parts if you want more or don't want some of these
String responseParts = "id,status,contentDetails.boundStreamId";

yt.liveBroadcasts().bind(broadcastId, responseParts)
.setApiKey(apiKey)
.setStreamId(streamId)
// other data you might want in request
.execute()

关于youtube - 如何获取 youtube live api 流 key ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58185499/

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