【问题标题】:"The user is blocked from live streaming." (Domain=com.google.GTLRErrorObjectDomain Code=403)“用户被阻止直播。” (域=com.google.GTLRErrorObjectDomain 代码=403)
【发布时间】:2019-08-27 18:32:15
【问题描述】:

当我尝试执行插入广播的请求时,我收到错误:

Error Domain=com.google.GTLRErrorObjectDomain Code=403 “用户被阻止直播。” UserInfo={GTLRStructuredError=GTLRErrorObject 0x28027ad30:{代码:403 错误:[1] 消息:“用户被阻止直播。”}, NSLocalizedDescription=用户被阻止直播。}

我今天开始收到此错误。之前,一切都运行良好。我已经测试了几个帐户,但都没有运气。

代码:

GTLRYouTube_LiveBroadcastSnippet *broadcastSnippet= [[GTLRYouTube_LiveBroadcastSnippet alloc] init];
    [broadcastSnippet setTitle:title];
    [broadcastSnippet setScheduledStartTime:[GTLRDateTime dateTimeWithDate:self.beginOfStream]]; // current date + 1 minute.
    [broadcastSnippet setScheduledEndTime:[GTLRDateTime dateTimeWithDate:[NSDate dateWithTimeIntervalSinceNow:80000]]];
    
    GTLRYouTube_LiveBroadcastStatus *status = [[GTLRYouTube_LiveBroadcastStatus alloc] init];
    [status setPrivacyStatus:[StreamSettings youtubeStringForPrivacyStatus:[privacyStatus intValue]]];
    
    GTLRYouTube_LiveBroadcastContentDetails *details = [self streamDetailsWith:latency];
    
    GTLRYouTube_LiveBroadcast *broadcast = [[GTLRYouTube_LiveBroadcast alloc] init];
    [broadcast setKind:@"youtube#liveBroadcast"];
    [broadcast setSnippet:broadcastSnippet];
    [broadcast setStatus:status];
    
    GTLRYouTubeQuery_LiveBroadcastsInsert *query = [GTLRYouTubeQuery_LiveBroadcastsInsert queryWithObject:broadcast
                                                                                part:@"id, snippet, contentDetails,status"];
    GTLRYouTubeService *service = self.youTubeService;
    __strong id <YouTubeHelperDelegate> strongDelegate = self.delegate;
    [service executeQuery:query completionHandler:^(GTLRServiceTicket *ticket,
                                                    GTLRYouTube_LiveBroadcast *returnedBrocast,
                                                    NSError *error) {
        if (error) {
            NSLog(@"%@", error); //Here is place I got an error 
        }
}];

【问题讨论】:

    标签: ios objective-c youtube-api youtube-livestreaming-api


    【解决方案1】:

    如果登录用户的订阅人数不超过 1000 人,他将无法使用移动应用上线,如链接中所述:

    https://support.google.com/youtube/answer/2853834?hl=en

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-04-08
      • 2013-02-03
      • 2016-12-02
      • 2021-11-20
      • 1970-01-01
      • 1970-01-01
      • 2021-01-31
      • 2011-11-14
      相关资源
      最近更新 更多