java - 如何获取当前 Activity 的直播流列表并按描述和位置过滤它们

标签 java youtube-api youtube-livestreaming-api

JAVA/YouTube API v3

I tried to do this through the developer's console JSON 响应为:

{
 "error": {
  "errors": [
   {
    "domain": "youtube.liveBroadcast",
    "reason": "liveStreamingNotEnabled",
    "message": "The user is not enabled for live streaming.",
    "extendedHelp": "https://www.youtube.com/features"
   }
  ],
  "code": 403,
  "message": "The user is not enabled for live streaming."
 }
}

弹出窗口显示:

This error may be due to using an insufficient credential type. Try using OAuth 2.0.

我的代码运行的响应相同:

GoogleJsonResponseException code: 403 : The user is not enabled for live streaming.
com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
  "code" : 403,
  "errors" : [ {
    "domain" : "youtube.liveBroadcast",
    "message" : "The user is not enabled for live streaming.",
    "reason" : "liveStreamingNotEnabled",
    "extendedHelp" : "https://www.youtube.com/features"
  } ],
  "message" : "The user is not enabled for live streaming."
}

好的。非常感谢达姆托! 我只是不需要为此使用“youtube-livestreaming-api”!

最佳答案

根据文档errors#liveBroadcasts_youtube.liveBroadcasts.transition

来自此 api 的实际使用评论。

The user that authorized the request is not enabled to stream live video on YouTube. The user needs to enable it find more information at youtube.com/features.

The YouTube Live Streaming API lets you create, update, and manage live events on YouTube.

关于java - 如何获取当前 Activity 的直播流列表并按描述和位置过滤它们,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60298318/

相关文章:

android - 2秒钟后,实时视频在Android应用程序的嵌入式Youtube Player中停止播放

YouTube Live - Replay/DVR 功能用户算作 "live viewer"吗?

Java 相当于 C++ std::map?

java - 函数中重新赋值后全局变量赋值保持不变(Android Studio)

jquery - 如何使用 jQuery 单击按钮时暂停 YouTube 视频?

youtube - 使用 youtube data api 设置视频游戏

javascript - Youtube API : Dynamic naming and looping

javascript - 检查 YouTube 视频是否在线或已上传

java - 有没有办法在jshell中对顶级函数使用方法引用?

java - 是否可以使用字符串的内容来转换对象?