twilio-video.js icon indicating copy to clipboard operation
twilio-video.js copied to clipboard

remote participants networkQualityLevel returns null

Open alejo9226 opened this issue 2 years ago • 5 comments

Trying to access room participants network quality for hosts debugging purposes but getting null even when room settings have been set as 2 for both local participants and remote participants

  • [X] I have verified that the issue occurs with the latest twilio-video.js release and is not marked as a known issue in the CHANGELOG.md.
  • [X] I reviewed the Common Issues and open GitHub issues and verified that this report represents a potentially new issue.
  • [X] I verified that the Quickstart application works in my environment.
  • [X] I am not sharing any Personally Identifiable Information (PII) or sensitive account information (API keys, credentials, etc.) when reporting this issue.

Code to reproduce the issue:

// export default function useConnectionOptions() {
  const { roomType, settings } = useAppState();

  // See: https://sdk.twilio.com/js/video/releases/2.0.0/docs/global.html#ConnectOptions
  // for available connection options.
  const connectionOptions: ConnectOptions = {
    // Bandwidth Profile, Dominant Speaker, and Network Quality
    // features are only available in Small Group or Group Rooms.
    // Please set "Room Type" to "Group" or "Small Group" in your
    // Twilio Console: https://www.twilio.com/console/video/configure
    // video: { height: 720, frameRate: 24, width: 1280 },
    bandwidthProfile: {
      video: {
        mode: settings.bandwidthProfileMode,
        dominantSpeakerPriority: settings.dominantSpeakerPriority,
        trackSwitchOffMode: settings.trackSwitchOffMode,
        contentPreferencesMode: settings.contentPreferencesMode,
        clientTrackSwitchOffControl: settings.clientTrackSwitchOffControl,
      },
    },
    dominantSpeaker: true,
    networkQuality: { local: 2, remote: 2 },

    // Comment this line if you are playing music.
    maxAudioBitrate: Number(settings.maxAudioBitrate),

    // VP8 simulcast enables the media server in a Small Group or Group Room
    // to adapt your encoded video quality for each RemoteParticipant based on
    // their individual bandwidth constraints. Simulcast should be disabled if
    // you are using Peer-to-Peer or 'Go' Rooms.
    preferredVideoCodecs: [{ codec: 'VP8', simulcast: roomType !== 'peer-to-peer' && roomType !== 'go' }],

    //@ts-ignore - Internal use only. This property is not exposed in type definitions.
    environment: process.env.REACT_APP_TWILIO_ENVIRONMENT,
  };

  // For mobile browsers, limit the maximum incoming video bitrate to 2.5 Mbps.
  if (isMobile && connectionOptions?.bandwidthProfile?.video) {
    connectionOptions!.bandwidthProfile!.video!.maxSubscriptionBitrate = 2500000;
  }

  if (process.env.REACT_APP_TWILIO_ENVIRONMENT === 'dev') {
    //@ts-ignore - Internal use only. This property is not exposed in type definitions.
    connectionOptions!.wsServer = 'wss://us2.vss.dev.twilio.com/signaling';
  }

  // Here we remove any 'undefined' values. The twilio-video SDK will only use defaults
  // when no value is passed for an option. It will throw an error when 'undefined' is passed.
  return removeUndefineds(connectionOptions);
}

Expected behavior:

Get the network quality level of the remote participants

Actual behavior:

Getting null for the networkQualityLevel and networkQualityStats on remote participants

Screen Shot 2022-01-14 at 4 36 25 PM

TODO

Software versions:

  • [X] Browser(s): Google Chrome 97.0.4692.71
  • [X] Operating System: Mac OS Monterey v12.0.1
  • [X] twilio-video.js: 2.18.3
  • [X] Third-party libraries (e.g., Angular, React, etc.): React v16.14.0

alejo9226 avatar Jan 14 '22 21:01 alejo9226

Hi @alejo9226 , thank you for the report. I created an internal ticket to investigate further.

charliesantos avatar Jan 27 '22 17:01 charliesantos

Hi @alejo9226 can you please try on the latest release?

charliesantos avatar Feb 22 '22 20:02 charliesantos

@charliesantos I had tried using latest version @2.21.1 and connection settings were networkQuality: { local: 2, remote: 2 }, still getting null for networkQualityLevel. image

keminkasundra avatar Apr 20 '22 12:04 keminkasundra

@keminkasundra can you please post your connect options here and provide me a room sid?

charliesantos avatar Apr 20 '22 20:04 charliesantos

I am facing the same problem. Remote participant always holds a null value for networkQualityLevel. I am using a latest release 2.21.1 Any solution for this yet?

hitesh033 avatar May 04 '22 07:05 hitesh033

any solution for this yet??

LorenzoLopez200123 avatar Jan 05 '23 20:01 LorenzoLopez200123