Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

fix(remotecontrol): Execute Reciever.enable only when the value is changed

hristoterezov05bfbf562022
diff --git a/modules/remotecontrol/Receiver.js b/modules/remotecontrol/Receiver.js
index 88c33eafc0..cf60636176 100644
--- a/modules/remotecontrol/Receiver.js
+++ b/modules/remotecontrol/Receiver.js
@@ -32,9 +32,10 @@ export default class Receiver extends RemoteControlParticipant {
* @param {boolean} enabled the new state.
*/
enable(enabled) {
- if(this.enabled !== enabled) {
- this.enabled = enabled;
+ if(this.enabled === enabled) {
+ return;
}
+ this.enabled = enabled;
if(enabled === true) {
logger.log("Remote control receiver enabled.");
// Announce remote control support.