Twilio-video.js: Incorrect Audio Level on Chromium

Created on 14 Oct 2020  路  4Comments  路  Source: twilio/twilio-video.js

  • [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.
  • [ ] 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.

Note: I did not verify the Quickstart example because the same example works properly on another platform.

Code to reproduce the issue:

room.getStats().then(function(value) {
    if (value && value.length) {
        value[0].remoteAudioTrackStats.forEach(function(track) {
            log(`track.trackSid: ${track.trackSid} level ${track.audioLevel}`);
        });
    }
});

Expected behavior:

Audio levels in the documented range 0...32767, working good on Safari 14 on Mac OS:

[Log] "track.trackSid: MT3af13d717aff1d269e56d2fd64c3856b level null"
[Log] "track.trackSid: MT3af13d717aff1d269e56d2fd64c3856b level 43"
[Log] "track.trackSid: MT3af13d717aff1d269e56d2fd64c3856b level 28"
[Log] "track.trackSid: MT3af13d717aff1d269e56d2fd64c3856b level 23"
[Log] "track.trackSid: MT3af13d717aff1d269e56d2fd64c3856b level 25"

Actual behavior:

Out of range values on Brave Browser 1.15.72:

// not speaking, room is silent:
track.trackSid: MTfbcf486eef... level 753641
track.trackSid: MTfbcf486eef... level 753641
track.trackSid: MTfbcf486eef... level 819175
track.trackSid: MTfbcf486eef... level 622573

// when speaking:
track.trackSid: MTfbcf486eef... level 243688179
track.trackSid: MTfbcf486eef... level 12746363

Software versions:

  • [ ] Browser(s): Brave Browser Version 1.15.72 Chromium: 86.0.4240.75 (Official Build) (x86_64)
  • [ ] Operating System: Mac OS Version 10.15.7
  • [ ] twilio-video.js: 2.7.2
  • [ ] Third-party libraries (e.g., Angular, React, etc.): Riot Tag
Chrome bug bug filed

Most helpful comment

Hello @julien-l and @tr00st - Thank you for reporting this issue. This looks like bug in recent version of chrome which is returning wrong values for audioLevel. I will file a bug against chrome soon, I have also filed a bug to workaround this issue in the SDK (JSDK-3053).

All 4 comments

Official Chrome 86 seems to be having similar issues, (v85 working fine).

(EDIT: Previously included some tests showing different numbers - then realised we've divided and log-scaled them. That would put them on similar scales to what julien saw above - I'll take a look and post updated numbers if they differ).

Out-of-range numbers on Windows 10 - 10.0.19042, Chrome 86.0.4240.75
Working fine on Windows 10 - 10.0.19042, Chrome 85.0.4183.121

Hi @julien-l ,

Thanks for writing in with your issue. @makarandp0 Can you take a look and file a Chromium bug if necessary?

Thanks,

Manjesh

Hello @julien-l and @tr00st - Thank you for reporting this issue. This looks like bug in recent version of chrome which is returning wrong values for audioLevel. I will file a bug against chrome soon, I have also filed a bug to workaround this issue in the SDK (JSDK-3053).

This is https://bugs.chromium.org/p/chromium/issues/detail?id=1142626 and looks like it will get fixed in M88. I will keep watch on the chrome build when it's available

Was this page helpful?
0 / 5 - 0 ratings