Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

Adds config option for auto enable desktop sharing when opening an url.

damencho74c420a609a7
diff --git a/modules/UI/UI.js b/modules/UI/UI.js
index 3bf7c3dda5..6372563941 100644
--- a/modules/UI/UI.js
+++ b/modules/UI/UI.js
@@ -528,6 +528,8 @@ function onMucJoined(jid, info) {
VideoLayout.mucJoined();
+
+ Toolbar.checkAutoEnableDesktopSharing();
}
function initEtherpad(name) {
diff --git a/modules/UI/toolbars/Toolbar.js b/modules/UI/toolbars/Toolbar.js
index 9f229ddfdd..03949b09fc 100644
--- a/modules/UI/toolbars/Toolbar.js
+++ b/modules/UI/toolbars/Toolbar.js
@@ -632,13 +632,23 @@ var Toolbar = (function (my) {
}
};
- // checks whether recording is enabled and whether we have params to start automatically recording
+ // checks whether recording is enabled and whether we have params
+ // to start automatically recording
my.checkAutoRecord = function () {
if (UIUtil.isButtonEnabled('recording') && config.autoRecord) {
toggleRecording(config.autoRecordToken);
}
};
+ // checks whether desktop sharing is enabled and whether
+ // we have params to start automatically sharing
+ my.checkAutoEnableDesktopSharing = function () {
+ if (UIUtil.isButtonEnabled('desktop')
+ && config.autoEnableDesktopSharing) {
+ APP.desktopsharing.toggleScreenSharing();
+ }
+ };
+
// Shows or hides SIP calls button
my.showSipCallButton = function (show) {
if (APP.xmpp.isSipGatewayEnabled() && UIUtil.isButtonEnabled('sip') && show) {