How to identify opponent user enable or disable video in quickblox ios

327 views Asked by At

How to identify opponent user enable or disable video in Quickblox SDK. Please give the solution or delegate methods

2

There are 2 answers

4
sohan vanani On

You can check this with the WebRTC Stats reporting. To start collecting report information do the following:

[QBRTCConfig setStatsReportTimeInterval:5]; // 5 seconds

And classes that adopt QBRTCClientDelegate protocol will be notified with

     - (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);


        }

For reference : Quickblox API

0
Valentyn Tereshchenko On

Also you can use System Notifications feature from QuickBlox SDK. For example, user will send system message with this event (disable camera) and other users will listen this event and do something needed action (guide for Android)