diff --git a/conference.js b/conference.js index d483884227..e71db8db5c 100644 --- a/conference.js +++ b/conference.js @@ -1114,16 +1114,6 @@ export default { room.addCommandListener( Commands.SHARED_VIDEO, ({value, attributes}, id) => { - // if we are not the moderator or - // the command is coming from a user which is not the moderator - if (!(this.isLocalId(id) && room.isModerator()) - && !this.isParticipantModerator(id)) - { - console.warn('Received shared video command ' + - 'not from moderator'); - return; - } - if (attributes.state === 'stop') { APP.UI.stopSharedVideo(id, attributes); } else if (attributes.state === 'start') { diff --git a/lang/main.json b/lang/main.json index f03c1bbc3c..24199d190b 100644 --- a/lang/main.json +++ b/lang/main.json @@ -166,6 +166,7 @@ "shareVideoLinkError": "Please provide a correct youtube link.", "removeSharedVideoTitle": "Remove shared video", "removeSharedVideoMsg": "Are you sure you would like to remove your shared video?", + "alreadySharedVideoMsg": "Another participant is already sharing video. This conference allows only one shared video at a time.", "WaitingForHost": "Waiting for the host ...", "WaitForHostMsg": "The conference __room__ has not yet started. If you are the host then please authenticate. Otherwise, please wait for the host to arrive.", "IamHost": "I am the host", diff --git a/modules/UI/shared_video/SharedVideo.js b/modules/UI/shared_video/SharedVideo.js index f769a1f59c..75899715dd 100644 --- a/modules/UI/shared_video/SharedVideo.js +++ b/modules/UI/shared_video/SharedVideo.js @@ -43,8 +43,15 @@ export default class SharedVideoManager { return; } - showStopVideoPropmpt().then(() => - this.emitter.emit(UIEvents.UPDATE_SHARED_VIDEO, null, 'stop')); + if(APP.conference.isLocalId(this.from)) { + showStopVideoPropmpt().then(() => + this.emitter.emit(UIEvents.UPDATE_SHARED_VIDEO, null, 'stop')); + } else { + messageHandler.openMessageDialog( + "dialog.shareVideoTitle", + "dialog.alreadySharedVideoMsg" + ); + } } /** diff --git a/modules/UI/toolbars/Toolbar.js b/modules/UI/toolbars/Toolbar.js index 890b13bb27..687e91783a 100644 --- a/modules/UI/toolbars/Toolbar.js +++ b/modules/UI/toolbars/Toolbar.js @@ -289,8 +289,9 @@ const Toolbar = { }, // Shows or hides the 'shared video' button. - showSharedVideoButton (show) { - if (UIUtil.isButtonEnabled('sharedvideo') && show) { + showSharedVideoButton () { + if (UIUtil.isButtonEnabled('sharedvideo') + && config.disableThirdPartyRequests !== true) { $('#toolbar_button_sharedvideo').css({display: "inline-block"}); } else { $('#toolbar_button_sharedvideo').css({display: "none"});