I'm just trying to wrap my head around an event listener in Jitsi Meet API, I haven't run across something like this and I'm sure its the same concept in alot of api's - I'm not sure on approach.
Basically in the jitsi meet api you can use api.addEventListener(audioMuteStatusChanged, listener); to set up an event listener if mute is toggled. Basically, true if muted, false if not. I'm trying to get a value of if it to see when it's muted, or when it isn't muted.
It says "The listener parameter is a Function object with one argument that will be notified when the event occurs with data related to the event."
So how do I get the true false value when something is changed?
const result = api.addEventListener(audioMuteStatusChanged, return isitmuted);
Edit: Tried it with:
if (audioChatApi) {
audioChatApi.addEventListener(audioMuteStatusChanged, function(listener) {
if (listener){
console.log("True " + listener);
} else {
console.log("False");
};
});
};
and didn't solve it, I think the event isn't for this task