Skip to content

Initialization of noise cancellation is blocking #1786

@fidesit

Description

@fidesit

Which package/packages do you use?

  • @stream-io/video-react-sdk
  • @stream-io/video-react-native-sdk
  • @stream-io/video-client

Describe the bug
Initializing noise cancellation takes 10+ seconds on MS Edge

To Reproduce

 private enableNoiseCancellation() {
    setTimeout(() => {
      this.ngZone.runOutsideAngular(() => {
        const isSupported = this.noiseCancellation.isSupported();
        (typeof isSupported === 'boolean' ? Promise.resolve(isSupported) : isSupported)
          .then(async (supported: boolean) => {
            if (supported) {
              await this.noiseCancellation.init();
              // provide the NoiseCancellation instance to the call and register the plugin
              await this.call.microphone.enableNoiseCancellation(this.noiseCancellation);
              logZoomDebug('stream: noise cancellation enabled');
            } else {
              logZoomDebug('stream: noise cancellation NOT supported');
            }
          })
      })
    })
  }

Expected behavior
I would expect the initialization of noise cancellation to be non-blocking, so I can continue loading my UI without having to wait.. now it blocks angular processing, causing UI update delays..

Version

"@stream-io/audio-filters-web": "^0.2.3",
"@stream-io/video-client": "^1.20.2",

Env:

Local , Angular 19

  • Browser [e.g. chrome, safari]

MS Edge v136.0.3240.50

  • OS: [e.g. iOS, linux...]

Windows 11

Additional context
See performance trace from MS Edge (attached)

Image

Trace-20250509T095112.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions