Enables shared video for all participants, the first to share is the video all will see, later attempts will result just a dialog informing that video is already shared.
This commit is contained in:
parent
9b09e61877
commit
7d0cd00a50
|
@ -1114,16 +1114,6 @@ export default {
|
||||||
room.addCommandListener(
|
room.addCommandListener(
|
||||||
Commands.SHARED_VIDEO, ({value, attributes}, id) => {
|
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') {
|
if (attributes.state === 'stop') {
|
||||||
APP.UI.stopSharedVideo(id, attributes);
|
APP.UI.stopSharedVideo(id, attributes);
|
||||||
} else if (attributes.state === 'start') {
|
} else if (attributes.state === 'start') {
|
||||||
|
|
|
@ -166,6 +166,7 @@
|
||||||
"shareVideoLinkError": "Please provide a correct youtube link.",
|
"shareVideoLinkError": "Please provide a correct youtube link.",
|
||||||
"removeSharedVideoTitle": "Remove shared video",
|
"removeSharedVideoTitle": "Remove shared video",
|
||||||
"removeSharedVideoMsg": "Are you sure you would like to remove your 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 ...",
|
"WaitingForHost": "Waiting for the host ...",
|
||||||
"WaitForHostMsg": "The conference <b>__room__ </b> has not yet started. If you are the host then please authenticate. Otherwise, please wait for the host to arrive.",
|
"WaitForHostMsg": "The conference <b>__room__ </b> 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",
|
"IamHost": "I am the host",
|
||||||
|
|
|
@ -43,8 +43,15 @@ export default class SharedVideoManager {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(APP.conference.isLocalId(this.from)) {
|
||||||
showStopVideoPropmpt().then(() =>
|
showStopVideoPropmpt().then(() =>
|
||||||
this.emitter.emit(UIEvents.UPDATE_SHARED_VIDEO, null, 'stop'));
|
this.emitter.emit(UIEvents.UPDATE_SHARED_VIDEO, null, 'stop'));
|
||||||
|
} else {
|
||||||
|
messageHandler.openMessageDialog(
|
||||||
|
"dialog.shareVideoTitle",
|
||||||
|
"dialog.alreadySharedVideoMsg"
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -289,8 +289,9 @@ const Toolbar = {
|
||||||
},
|
},
|
||||||
|
|
||||||
// Shows or hides the 'shared video' button.
|
// Shows or hides the 'shared video' button.
|
||||||
showSharedVideoButton (show) {
|
showSharedVideoButton () {
|
||||||
if (UIUtil.isButtonEnabled('sharedvideo') && show) {
|
if (UIUtil.isButtonEnabled('sharedvideo')
|
||||||
|
&& config.disableThirdPartyRequests !== true) {
|
||||||
$('#toolbar_button_sharedvideo').css({display: "inline-block"});
|
$('#toolbar_button_sharedvideo').css({display: "inline-block"});
|
||||||
} else {
|
} else {
|
||||||
$('#toolbar_button_sharedvideo').css({display: "none"});
|
$('#toolbar_button_sharedvideo').css({display: "none"});
|
||||||
|
|
Loading…
Reference in New Issue