2015-09-02 58 views
4

我正在使用Google's YouTube API Exploreralternate)查找有关an arbitrary streaming broadcast的信息。YouTube Streaming API表示用户未启用实时流式传输

不管我怎么投入id场,我总是回来

{ 
    "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." 
    } 
} 

这似乎是可笑的,考虑到视频流明明白白。

我想到我可能误解了id字段的说明,所以我尝试了几种不同的可能性。这些措施包括...

  • 的频道ID(UCHZoP1Jy-g_h3sqzScrOEwQ
  • 用户ID(GWTV
  • 视频ID(J_RrkyIOVhg

...每个都无济于事。

我该如何询问一个有关其实时流式视频的频道? This question在过去会回答,但评论表明答案不再有效。 This question也没有任何帮助。

+0

你好迈克尔,我得到同样的错误“用户没有启用直播流”。当我运行“CreateBroadcast.java”文件的示例代码时。你是如何解决这个问题的。你能帮我解决吗? –

+0

@Rajeev我可以让你进一步,但我最终没有得到这个工作。如果您启用自己的帐户直播,您可以通过_that错误,但是当我这样做时,我[仍然无法获取任何数据。](http://stackoverflow.com/q/32380110/241211) – Michael

回答

3

的API文档的Errors heading有这个有趣的图表:

Error Type | Error Detail    | Description 
-----------+-----------------------------+------------------------------------------ 
insuf...ns | insufficientLivePermissions | The request is not authorized to retrieve 
      |        | the live broadcast. 
-----------+-----------------------------+------------------------------------------ 
insuf...ns | liveStreamingNotEnabled  | The user that authorized the request is not 
      |        | enabled to stream live video on YouTube. 
      |   ^    | The user can find more information at 
      | (I'm getting this one) | https://www.youtube.com/features. 

这意味着因为帐户未启用即时串流功能,我可以不看任何人别人的实时流信息在API中,即使我可以在浏览器中使用它。

这看起来很随意,但事实证明是权限问题。

请注意,我still can't get useful data

+0

去了链接,并启用直播流......它的工作! – Technotronic

+0

@Technotronic:你说你去过一个API链接,并且你能够检索到别人(而不是你自己的)流式视频的信息?如果是这样,你在各个领域都投入了什么? – Michael

+0

我授权自己能够通过流槽https://www.youtube.com/features – Technotronic