如何识别对手用户在quickblox SDK中启用或禁用视频ios
答
您可以使用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 | %@/%@ | %@ms\n";
[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
嗨@sohan,感谢您的帮助。但它不起作用。请告诉其他解决方案。 –
当对手禁用视频时,你在videoReceivedBitrate中获得了什么? @ManikandanSundar –
和屏幕变为空白? –