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 ? - + : null) ); diff --git a/bigbluebutton-html5/imports/ui/components/screenshare/component.jsx b/bigbluebutton-html5/imports/ui/components/screenshare/component.jsx index 433e6adeb0..906e66c6aa 100755 --- a/bigbluebutton-html5/imports/ui/components/screenshare/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/screenshare/component.jsx @@ -29,8 +29,8 @@ export default class ScreenshareComponent extends React.Component { render() { return ( - [!this.state.loaded ? (
) : null, - ()] + [!this.state.loaded ? () : null, + ()] ); } } diff --git a/bigbluebutton-html5/imports/ui/components/video-provider/video-menu/component.jsx b/bigbluebutton-html5/imports/ui/components/video-provider/video-menu/component.jsx index 867ba8f7ba..80c48a5029 100755 --- a/bigbluebutton-html5/imports/ui/components/video-provider/video-menu/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/video-provider/video-menu/component.jsx @@ -48,6 +48,7 @@ const JoinVideoOptions = ({ description={item.description} onClick={item.click} tabIndex={-1} + id={item.id} > {item.label} diff --git a/bigbluebutton-html5/imports/ui/components/video-provider/video-menu/container.jsx b/bigbluebutton-html5/imports/ui/components/video-provider/video-menu/container.jsx index 0648d047a0..2994d93fae 100755 --- a/bigbluebutton-html5/imports/ui/components/video-provider/video-menu/container.jsx +++ b/bigbluebutton-html5/imports/ui/components/video-provider/video-menu/container.jsx @@ -42,6 +42,7 @@ const JoinVideoOptionsContainer = (props) => { label: intl.formatMessage(intlMessages.swapCam), disabled: !swapLayoutAllowed, click: toggleSwapLayout, + id: 'swap-button', }, { iconPath: `${baseName}/resources/images/video-menu/icon-webcam-off.svg`, @@ -49,6 +50,7 @@ const JoinVideoOptionsContainer = (props) => { label: intl.formatMessage(intlMessages[isSharingVideo ? 'leaveVideo' : 'joinVideo']), disabled: isDisabled && !isSharingVideo, click: isSharingVideo ? handleCloseVideo : handleJoinVideo, + id: isSharingVideo ? 'leave-video-button' : 'join-video-button', }, ]; diff --git a/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy b/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy index 338a2e5b2b..3fc7319b82 100755 --- a/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy +++ b/bigbluebutton-web/grails-app/controllers/org/bigbluebutton/web/controllers/ApiController.groovy @@ -1388,8 +1388,7 @@ class ApiController { defaultLayout = us.defaultLayout avatarURL = us.avatarURL customdata = array { - userCustomData.each { k, v -> - // Somehow we need to prepend something (custdata) for the JSON to work + meeting.getUserCustomData(us.externUserID).each { k, v -> custdata "$k" : v } }