Merge branch 'v2.0.x-release' of https://github.com/bigbluebutton/bigbluebutton into settings-lock-video-dock

This commit is contained in:
Lucas Fialho Zawacki 2018-02-09 19:33:55 +00:00
commit 333bba0a77
8 changed files with 63 additions and 30 deletions

View File

@ -9,7 +9,6 @@
#altContent { /* style alt content */ }
.visually-hidden {
position: absolute !important;
clip: rect(1px 1px, 1px, 1px);
clip: rect(1px, 1px, 1px, 1px);
padding: 0 !important;
border: 0 !important;
@ -163,24 +162,33 @@
}
</script>
<script type="text/javascript">
window.onload = function() {
let checkRequest = $.ajax({
dataType: 'json',
url: '/html5client/check'
});
checkRequest.done(function(data) {
if(typeof data.html5clientStatus !== "undefined" && data.html5clientStatus === "running" && document.getElementById('html5Section') != null) {
document.getElementById('html5Section').style.display='inherit';
}
});
if (fillContent) fillContent();
};
window.onload = function () {
const checkRequest = $.ajax({
dataType: 'json',
url: '/html5client/check',
});
checkRequest.done(function(data) {
if (data.html5clientStatus && data.html5clientStatus === 'running') {
const iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
const android = navigator.userAgent.match(/android/ig);
const puffin = navigator.userAgent.match(/Puffin/ig);
function html5() {
// Navigate to HTML5 login
document.location.pathname = "/html5client/join";
}
if ((iOS || android) && !puffin) {
redirectToHtml5();
}
if (document.getElementById('html5Section')) {
document.getElementById('html5Section').style.display = 'inherit';
}
}
});
if (fillContent) fillContent();
};
function redirectToHtml5 () {
document.location.pathname = '/html5client/join';
}
</script>
</head>
@ -203,7 +211,7 @@
</a>
<div id="html5Section" style="display:none">
<p>OR</p>
<button type="button" onclick="html5();"><h3>Launch the HTML5 client instead</h3></button>
<button type="button" onclick="redirectToHtml5();"><h3>Launch the HTML5 client instead</h3></button>
</div>
</div>
</div>

View File

@ -290,7 +290,7 @@ stop_bigbluebutton () {
echo "Stopping BigBlueButton"
if command -v systemctl >/dev/null; then
if [ -f /usr/lib/systemd/system/bbb-html5.service ]; then
HTML5="mongod bbb-html5"
HTML5="mongod bbb-html5 bbb-webrtc-sfu kurento-media-server-6.0"
fi
if [ -f /usr/lib/systemd/system/bbb-webhooks.service ]; then
WEBHOOKS=bbb-webhooks
@ -346,7 +346,7 @@ start_bigbluebutton () {
echo "Starting BigBlueButton"
if command -v systemctl >/dev/null; then
if [ -f /usr/lib/systemd/system/bbb-html5.service ]; then
HTML5="mongod bbb-html5"
HTML5="mongod bbb-html5 bbb-webrtc-sfu kurento-media-server-6.0"
fi
if [ -f /usr/lib/systemd/system/bbb-webhooks.service ]; then
WEBHOOKS=bbb-webhooks
@ -355,7 +355,7 @@ start_bigbluebutton () {
BBB_TRANSCODE_AKKA=bbb-transcode-akka
fi
systemctl start red5 $TOMCAT_SERVICE nginx freeswitch $REDIS_SERVICE bbb-apps-akka $BBB_TRANSCODE_AKKA bbb-fsesl-akka bbb-record-core.timer $WEBHOOKS
systemctl start red5 $TOMCAT_SERVICE nginx freeswitch $REDIS_SERVICE bbb-apps-akka $BBB_TRANSCODE_AKKA bbb-fsesl-akka bbb-record-core.timer $HTML5 $WEBHOOKS
if [ -f /usr/lib/systemd/system/bbb-html5.service ]; then
systemctl start mongod
sleep 3
@ -483,7 +483,12 @@ start_bigbluebutton () {
display_bigbluebutton_status () {
if command -v systemctl >/dev/null; then
units="start red5 $TOMCAT_SERVICE nginx freeswitch $REDIS_SERVICE bbb-apps-akka bbb-transcode-akka bbb-fsesl-akka"
units="red5 $TOMCAT_SERVICE nginx freeswitch $REDIS_SERVICE bbb-apps-akka bbb-transcode-akka bbb-fsesl-akka"
if [ -f /usr/lib/systemd/system/bbb-html5.service ]; then
units="$units mongod bbb-html5 bbb-webrtc-sfu kurento-media-server-6.0"
fi
for unit in $units; do
echo "$unit: $(systemctl is-active $unit)"
done
@ -1848,6 +1853,10 @@ if [ -n "$HOST" ]; then
WS=$(cat $SERVLET_DIR/bigbluebutton/WEB-INF/classes/bigbluebutton.properties | grep -v '#' | sed -n '/^bigbluebutton.web.serverURL/{s/.*=//;p}' | sed 's/https/wss/g' | sed s'/http/ws/g')
sed -i "s|\"wsUrl.*|\"wsUrl\": \"$WS/bbb-webrtc-sfu\",|g" \
/usr/share/meteor/bundle/programs/server/assets/app/config/settings-production.json
if [ -f /usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml ]; then
change_yml_value /usr/local/bigbluebutton/bbb-webrtc-sfu/config/default.yml kurentoUrl "wss://$HOST/kurento"
fi
fi

View File

@ -1,7 +1,9 @@
import RedisPubSub from '/imports/startup/server/redis';
import { check } from 'meteor/check';
export default function handleMeetingDestruction(_, meetingId) {
export default function handleMeetingDestruction({ body }) {
check(body, Object);
const { meetingId } = body;
check(meetingId, String);
return RedisPubSub.destroyMeetingQueue(meetingId);

View File

@ -16,5 +16,11 @@ export default function handlePresenterAssigned({ body }, meetingId) {
};
const prevPresenter = Users.findOne(selector);
// no previous presenters
if (!prevPresenter) {
return true;
}
return changeRole(ROLE_PRESENTER, false, prevPresenter.userId, meetingId, assignedBy);
}

View File

@ -206,7 +206,11 @@ class Settings extends Component {
);
}
render() {
const { intl } = this.props;
const {
intl,
router,
location,
} = this.props;
return (
<Modal
@ -214,6 +218,9 @@ class Settings extends Component {
confirm={{
callback: () => {
this.props.mountModal(null);
if (location.pathname.includes('/users')) {
router.push('/');
}
this.updateSettings(this.state.current);
},
label: intl.formatMessage(intlMessages.SaveLabel),

View File

@ -1,5 +1,6 @@
import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import { withRouter } from 'react-router';
import SettingsService from '/imports/ui/services/settings';
import Settings from './component';
@ -14,7 +15,7 @@ const SettingsContainer = props => (
<Settings {...props} />
);
export default withTracker(() => ({
export default withRouter(withTracker(() => ({
audio: SettingsService.audio,
video: SettingsService.video,
application: SettingsService.application,
@ -24,4 +25,4 @@ export default withTracker(() => ({
locales: getClosedCaptionLocales(),
availableLocales: getAvailableLocales(),
isModerator: getUserRoles() === 'MODERATOR',
}))(SettingsContainer);
}))(SettingsContainer));

View File

@ -309,7 +309,7 @@ const removeUser = (userId) => {
}
};
const toggleVoice = (userId) => { makeCall('toggleVoice', userId); };
const toggleVoice = (userId) => { userId === Auth.userID ? makeCall('toggleSelfVoice') : makeCall('toggleVoice', userId); };
const changeRole = (userId, role) => { makeCall('changeRole', userId, role); };

View File

@ -168,12 +168,12 @@ class UserParticipants extends Component {
},
mute: {
label: () => intl.formatMessage(intlMessages.MuteUserAudioLabel),
handler: user => toggleVoice(user.id),
handler: (user) => toggleVoice(user.id),
icon: 'audio_off',
},
unmute: {
label: () => intl.formatMessage(intlMessages.UnmuteUserAudioLabel),
handler: user => toggleVoice(user.id),
handler: (user) => toggleVoice(user.id),
icon: 'audio_on',
},
promote: {