diff --git a/bigbluebutton-html5/imports/startup/client/auth.js b/bigbluebutton-html5/imports/startup/client/auth.js index fa49925370..4a0abfb716 100755 --- a/bigbluebutton-html5/imports/startup/client/auth.js +++ b/bigbluebutton-html5/imports/startup/client/auth.js @@ -8,6 +8,7 @@ import logger from '/imports/startup/client/logger'; // disconnected and trying to open a new connection const STATUS_CONNECTING = 'connecting'; const METADATA_KEY = 'metadata'; +const CUSTOM_DATA_KEY = 'customdata'; export function joinRouteHandler(nextState, replace, callback) { const { sessionToken } = nextState.location.query; @@ -28,8 +29,7 @@ export function joinRouteHandler(nextState, replace, callback) { .then(({ response }) => { const { returncode, meetingID, internalUserID, authToken, logoutUrl, customLogoURL, metadata, - externUserID, fullname, confname, - + externUserID, fullname, confname, customdata, } = response; if (returncode === 'FAILED') { @@ -38,6 +38,7 @@ export function joinRouteHandler(nextState, replace, callback) { } setCustomLogoUrl(customLogoURL); + const metakeys = metadata.length ? metadata.reduce((acc, meta) => { const key = Object.keys(meta).shift(); @@ -58,8 +59,31 @@ export function joinRouteHandler(nextState, replace, callback) { log('error', `Caught: ${e.message}`); } return { ...acc, [key]: value }; - }) : {}; + }, {}) : {}; + + const customData = customdata.length + ? customdata.reduce((acc, data) => { + const key = Object.keys(data).shift(); + + const handledHTML5Parameters = [ + 'html5recordingbot' + ]; + if (handledHTML5Parameters.indexOf(key) === -1) { + return acc; + } + + let value = data[key]; + try { + value = JSON.parse(value); + } catch (e) { + log('error', `Caught: ${e.message}`); + } + + return { ...acc, [key]: value}; + }, {}) : {}; + SessionStorage.setItem(METADATA_KEY, metakeys); + SessionStorage.setItem(CUSTOM_DATA_KEY, customData); Auth.set( meetingID, internalUserID, authToken, logoutUrl, diff --git a/bigbluebutton-html5/imports/ui/components/actions-bar/desktop-share/component.jsx b/bigbluebutton-html5/imports/ui/components/actions-bar/desktop-share/component.jsx index 3ab28abd21..8e9d680d6e 100755 --- a/bigbluebutton-html5/imports/ui/components/actions-bar/desktop-share/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/actions-bar/desktop-share/component.jsx @@ -43,21 +43,21 @@ const DesktopShare = ({ isUserPresenter, }) => ( (screenSharingCheck && !isMobileBrowser && isUserPresenter ? -