steep-balloon-41261
05/13/2025, 8:38 AMtall-airline-16756
05/13/2025, 8:38 AMtall-airline-16756
05/13/2025, 8:38 AMcreateAudioAnalyser
function, it provides a cleanup function that should be called when you're done with the audio analysis:
const { analyser, calculateVolume, cleanup } = createAudioAnalyser(track);
// Later when you're done with the audio analyzer:
await cleanup();
Similarly, in the Swift SDK, the E2EEManager
class has a cleanUp()
method, though specific usage details may vary.
As a general best practice, cleanup functions should be called when the associated resources are no longer needed, such as during component unmounting or when the application is shutting down. Let me know if you need further clarification!
Sources: createAudioAnalyser | LiveKit JS Client SDK - v2.8.1 | cleanUp() | Documentation