From 72c25b212ca156bb404efc41490823539ca78cba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5var=20Aamb=C3=B8=20Fosstveit?= Date: Thu, 4 Apr 2019 10:58:41 +0200 Subject: [PATCH] Separate settings for lastN for desktop and mobile --- app/public/config.example.js | 7 ++++--- app/src/RoomClient.js | 11 +++++++---- 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/app/public/config.example.js b/app/public/config.example.js index 08621eb..41ebc9d 100644 --- a/app/public/config.example.js +++ b/app/public/config.example.js @@ -17,11 +17,12 @@ var config = { tcp : true }, - lastN : 4, - background : 'images/background.jpg', + lastN : 4, + mobileLastN : 1, + background : 'images/background.jpg', // Add file and uncomment for adding logo to appbar // logo : 'images/logo.svg', - theme : + theme : { palette : { diff --git a/app/src/RoomClient.js b/app/src/RoomClient.js index 2604a48..6aed99c 100644 --- a/app/src/RoomClient.js +++ b/app/src/RoomClient.js @@ -15,7 +15,8 @@ const { turnServers, requestTimeout, transportOptions, - lastN + lastN, + mobileLastN } = window.config; const logger = new Logger('RoomClient'); @@ -24,8 +25,7 @@ let ROOM_OPTIONS = { requestTimeout : requestTimeout, transportOptions : transportOptions, - turnServers : turnServers, - maxSpotlights : lastN + turnServers : turnServers }; const VIDEO_CONSTRAINS = @@ -107,7 +107,10 @@ export default class RoomClient }); // Max spotlights - this._maxSpotlights = ROOM_OPTIONS.maxSpotlights; + if (device.bowser.ios || device.bowser.mobile || device.bowser.android) + this._maxSpotlights = mobileLastN; + else + this._maxSpotlights = lastN; // Manager of spotlight this._spotlights = null;