Jitsi-lib Remove all EventListener


#1

I’m trying to remove a listener

 localTracks[i].addEventListener(
            JitsiMeetJS.events.track.TRACK_AUDIO_LEVEL_CHANGED,
            onAudioLevelChanged);

Following : https://github.com/jitsi/lib-jitsi-meet/blob/master/doc/API.md#installation

    • removeEventListener(event, handler) - removes an event handler.

trying:

localTracks[i].removeEventListener(
           JitsiMeetJS.events.track.TRACK_AUDIO_LEVEL_CHANGED,
          onAudioLevelChanged);

not working

Is possible to use something like jQuery to remove eventlisteners ?
Something like JitsiMeetJS.events.track.off();