From 59d570aa0b984e9bcda18bcd6f56900b43d01a7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5var=20Aamb=C3=B8=20Fosstveit?= Date: Wed, 24 Oct 2018 10:06:10 +0200 Subject: [PATCH] Activate lastN --- app/lib/RoomClient.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/lib/RoomClient.js b/app/lib/RoomClient.js index d32e0d2..7bf0b3e 100644 --- a/app/lib/RoomClient.js +++ b/app/lib/RoomClient.js @@ -367,7 +367,7 @@ export default class RoomClient } }); } - catch(error) + catch (error) { logger.error('updateSpeakers() failed: %o', error); } @@ -1061,6 +1061,9 @@ export default class RoomClient this._dispatch( stateActions.setRoomActiveSpeaker(peerName)); + + if (peerName && peerName !== this._peerName) + this.handleActiveSpeaker(peerName); }); this._signalingSocket.on('display-name-changed', (data) => @@ -1240,7 +1243,7 @@ export default class RoomClient if (this._room.canSend('audio')) await this._setMicProducer(); - // Add our webcam (unless the cookie says no). + // Add our webcam (unless the cookie says no). if (this._room.canSend('video')) { const devicesCookie = cookiesManager.getDevices();