versatica / JsSIP

JsSIP, the JavaScript SIP library
https://jssip.net
Other
2.42k stars 744 forks source link

UnMute Call #831

Closed VGrytsenko2022 closed 1 year ago

VGrytsenko2022 commented 1 year ago

Hello Let me ask you a question. Stuck with a problem unmute call. My code // ======== // UNMUTE\MUTE CALL // ========

//UNMUTE this.muteAudio = function () { if (session.isMuted().audio === true) { session.mute({ audio: false, video: false

    });
    component.$server.auEvent(EventType.MUTED, "Microphone unmuted");

//MUTE
} else if (session.isMuted().audio === false) { session.mute({ audio: true, video: false

    });
    component.$server.auEvent(EventType.UNMUTED, "Microphone muted");
}

}

//MUTE - Works good //UNMUTE - Sound doesn't come back

Please tell me what is my mistake?

VGrytsenko2022 commented 1 year ago

I realized my mistake. the correct code looks like this, everything works, sorry ... this.muteAudio = function () { if (session.isMuted().audio === true) { session.unmute({ audio: true, video: false });

} else if (session.isMuted().audio === false) {
    session.mute({
        audio: true,
        video: false
    });
}

}

ibc commented 1 year ago

Next time, questions in the mailing list, please.