七牛IOS连麦,主播端无法采集声音

新手上路,请多包涵

ios和android都按照文档和DEMO接入了对应的七牛连麦SDK.
推流/播放皆正常,android端主播与android/ios副主播连麦正常,一旦ios是主播,与其他副主播连麦以后,主播端声音采集就出问题了,只能听到副主播的声音,主播完全静音了。

以下是IOS主播端相关代码:

//配置
PLVideoCaptureConfiguration *videoCaptureConfiguration = [PLVideoCaptureConfiguration defaultConfiguration];
    videoCaptureConfiguration.videoFrameRate=30;
    videoCaptureConfiguration.sessionPreset= AVCaptureSessionPreset1280x720;
    PLAudioCaptureConfiguration *audioCaptureConfiguration = [PLAudioCaptureConfiguration defaultConfiguration];
    
    PLVideoStreamingConfiguration *videoStreamingConfiguration = [PLVideoStreamingConfiguration defaultConfiguration];
    PLAudioStreamingConfiguration *audioStreamingConfiguration = [PLAudioStreamingConfiguration defaultConfiguration];
    
    self.session = [[PLMediaStreamingSession alloc] initWithVideoCaptureConfiguration:videoCaptureConfiguration audioCaptureConfiguration:audioCaptureConfiguration videoStreamingConfiguration:videoStreamingConfiguration audioStreamingConfiguration:audioStreamingConfiguration stream:nil];


//连麦部分
    PLRTCConferenceType conferenceType =  PLRTCConferenceTypeAudioAndVideo;
                //PLRTCConfiguration *configuration = [PLRTCConfiguration defaultConfiguration];
                PLRTCConfiguration *configuration = [[PLRTCConfiguration alloc] initWithVideoSize:PLRTCVideoSizePreset480x640 conferenceType:conferenceType];
                
                [self.session closeCurrentAudio];

                [self.session startConferenceWithRoomName:[Config getOwnID] userID:[Config getOwnID]roomToken:token rtcConfiguration:configuration];
                
                NSDictionary *option = @{kPLRTCRejoinTimesKey:@(2), kPLRTCConnetTimeoutKey:@(3000)};
                self.session.rtcOption = option;
                self.session.rtcMinVideoBitrate= 100 * 1000;
                self.session.rtcMaxVideoBitrate= 300 * 1000;
                self.session.rtcMixOverlayRectArray = [NSArray arrayWithObjects:[NSValue valueWithCGRect:CGRectMake(244, 448, 108, 192)], [NSValue valueWithCGRect:CGRectMake(244, 256, 108, 192)], nil];
阅读 2.8k
1 个回答

可以使用七牛的demo测试下,是否可以复现问题呢。

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题
logo
七牛云问答
子站问答
访问
宣传栏