如何在Quickblox SDK中识别对手用户启用或禁用视频。请提供解决方案或委托方法
答案 0 :(得分:0)
您可以使用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
答案 1 :(得分:0)
此外,您还可以使用QuickBlox SDK中的系统通知功能。例如,用户将使用此事件发送系统消息(禁用摄像头),其他用户将监听此事件并执行所需操作(guide for Android)