如何识别对手用户在quickblox SDK中启用或禁用视频ios

问题描述:

如何识别对手用户在Quickblox SDK中启用或禁用视频。请提供解决方案或委托方法如何识别对手用户在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

+0

嗨@sohan,感谢您的帮助。但它不起作用。请告诉其他解决方案。 –

+0

当对手禁用视频时,你在videoReceivedBitrate中获得了什么? @ManikandanSundar –

+0

和屏幕变为空白? –

您也可以使用系统通知,从功能QuickBlox SDK。例如,用户将发送系统消息与此事件(禁用摄像头)和其他用户将听取此事件,并做一些需要的行动(guide for Android