如何在QuickBlox iOS中识别对手用户启用或禁用视频



如何在QuickBlox SDK中识别对手用户启用或禁用视频。请提供解决方案或委托方法

您可以使用WEBRTC统计报告进行检查。要开始收集报告信息,请执行以下操作:

[QBRTCConfig setStatsReportTimeInterval:5]; // 5 seconds

和采用QBRTCCLIENTDELEGATE协议的类,将通过

通知
     - (void)session:(QBRTCSession *)session updatedStatsReport:(QBRTCStatsReport *)report forUserID:(NSNumber *)userID {
            double audioReceivedBitrate = report.audioReceivedBitrateTracker.bitrate;
            double videoReceivedBitrate = report.videoReceivedBitrateTracker.bitrate;
            //You can check Bitrate of the received video.
           NSMutableString *result = [NSMutableString string];
           // Video receive stats.
           NSString *videoReceiveFormat = @"VR (recv) %@x%@@%@fps | (decoded)%@ | (output)%@fps | %@/%@ | %@msn";
          [result appendString:[NSString stringWithFormat:videoReceiveFormat,
                              report.videoReceivedWidth, report.videoReceivedHeight, report.videoReceivedFps,
                              report.videoReceivedDecodedFps,
                              report.videoReceivedOutputFps,
                              report.videoReceivedBitrate, report.availableReceiveBandwidth,
                              report.videoReceivedDecodeMs]];
           NSLog(@"%@", result);

        }

供参考:QuickBlox API

您也可以使用QuickBlox SDK的系统通知功能。例如,用户将使用此事件(禁用相机)发送系统消息,而其他用户将收听此事件并执行所需的操作(Android指南)

相关内容

  • 没有找到相关文章

最新更新