react-native-twilio-video-webrtc icon indicating copy to clipboard operation
react-native-twilio-video-webrtc copied to clipboard

onNetworkQualityLevelsChanged not triggered

Open alfonsograziano opened this issue 4 years ago • 7 comments

Steps to reproduce

1.npm install https://github.com/blackuy/react-native-twilio-video-webrtc.git#b332f49d6aa418549733367af7bfa559caf251d0 2. set up twiliovideo 3.try to trigger onNetworkQualityLevelsChanged

Expected behaviour

onNetworkQualityLevelsChanged trigger function (from repo example)

Actual behaviour

onNetworkQualityLevelsChanged event is not triggered

My code:

 <TwilioVideo
        ref={twilioVideo}
        onRoomDidConnect={_onRoomDidConnect}
        onRoomDidDisconnect={_onRoomDidDisconnect}
        onRoomDidFailToConnect={_onRoomDidFailToConnect}
        onParticipantAddedVideoTrack={_onParticipantAddedVideoTrack}
        onParticipantRemovedVideoTrack={_onParticipantRemovedVideoTrack}
        onParticipantDisabledVideoTrack={_onParticipantDisabledVideoTrack}
        onParticipantEnabledVideoTrack={_onParticipantEnabledVideoTrack}
        onNetworkQualityLevelsChanged={_onNetworkLevelChanged}

      />

image

onNetworkQualityLevelsChanged have different color in vs code. How can i solve? How often this event is triggered?

alfonsograziano avatar Dec 16 '20 15:12 alfonsograziano

Color is consistent here: Screenshot 2020-12-16 at 15 45 53

Maybe check this: https://www.twilio.com/docs/video/using-network-quality-api#enabling-network-quality-reporting

Also at https://www.twilio.com/docs/video/using-network-quality-api#overview

The Network Quality API is only available in Group Rooms.

fabiendem avatar Dec 16 '20 15:12 fabiendem

I have uninstalled the library, downloaded from last commit and now on vs code the color is consistent but the event is not still triggered for me. I'll try to find a solution (platform Android)

alfonsograziano avatar Dec 16 '20 16:12 alfonsograziano

Also not triggering for me

zuhairnaqi avatar Jan 07 '21 15:01 zuhairnaqi

@zuhairnaqi and @lokk3d you have to enable it first as visible in the example:

https://github.com/blackuy/react-native-twilio-video-webrtc/blob/master/Example/index.js#L38

umarniz avatar Feb 11 '21 11:02 umarniz

@umarniz yes I did enableNetwork like this while connect twilioRef.connect({ accessToken: twilioToken, enableVideo: isVideoCall, enableNetworkQualityReporting: true });

zuhairnaqi avatar Feb 11 '21 14:02 zuhairnaqi

same issue here, enableNetworkQualityReporting is also to true

dayze avatar May 17 '21 11:05 dayze

That is quite strange, I can confirm that we have been using this in production for some time and have not seen any issues with this on several thousand phones that have been tested.

The issue is most likely either not having the correct version of Twilio installed (i.e a version that doesn't support this feature) or a potential JS mismatch, e.g callback with incorrect parameters or something similar.

My recommendation would be to do a clean install of the example and see if that works and if that doesn't work then try to do it in a simulator or an online device to see if its related to your device.

umarniz avatar May 18 '21 08:05 umarniz