Loading
fix(ui): recreate audio indicator analyser on track restart
fix(ui): recreate audio indicator analyser on track restart
The audio indicator stopped reacting to mic input after switching the audio input device.Previously this was masked by AudioIndicator re-rendering ~30 times per second from setSignalLevel, which caused the deps to be re-checked frequently. After 01e95116 moved signalLevel to a ref to reduce CPU load, the component no longer re-renders on its own, so the dep change was no longer detected.
Subscribe to TrackEvent.Restarted on the LocalAudioTrack and rebuild the analyser when it fires.