Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
Automatically initializes Chrome Web Store inline install URL with extension ID defined in config.js.
paweldomas83a685bca6c8
diff --git a/app.js b/app.jsindex b5f018d8fc..347b7f9b68 100644--- a/app.js+++ b/app.js@@ -1044,6 +1044,11 @@ $(document).ready(function () {// Set default desktop sharing methodsetDesktopSharing(config.desktopSharing);+ // Initialize Chrome extension inline installs+ if(config.chromeExtensionId)+ {+ initInlineInstalls();+ }// By default we use cameragetVideoSize = getCameraVideoSize;diff --git a/desktopsharing.js b/desktopsharing.jsindex 8e6179c3f7..9c46c82d93 100644--- a/desktopsharing.js+++ b/desktopsharing.js@@ -74,6 +74,25 @@ function showDesktopSharingButton() {}}+/**+ * Initializes <link rel=chrome-webstore-item /> with extension id set in config.js to support inline installs.+ * Host site must be selected as main website of published extension.+ */+function initInlineInstalls()+{+ $("link[rel=chrome-webstore-item]").attr("href", getWebStoreInstallUrl());+}++/**+ * Constructs inline install URL for Chrome desktop streaming extension.+ * The 'chromeExtensionId' must be defined in config.js.+ * @returns {string}+ */+function getWebStoreInstallUrl()+{+ return "https://chrome.google.com/webstore/detail/" + config.chromeExtensionId;+}+/** Toggles screen sharing.*/@@ -168,7 +187,7 @@ function obtainScreenFromExtension(streamCallback, failCallback) {doGetStreamFromExtension(streamCallback, failCallback);} else {chrome.webstore.install(- "https://chrome.google.com/webstore/detail/" + config.chromeExtensionId,+ getWebStoreInstallUrl(),function(arg) {console.log("Extension installed successfully", arg);// We need to reload the page in order to get the access to chrome.runtime@@ -188,7 +207,6 @@ function checkExtInstalled(isInstalledCallback) {if(!chrome.runtime) {// No API, so no extension for sureisInstalledCallback(false);- return false;}chrome.runtime.sendMessage(config.chromeExtensionId,diff --git a/index.html b/index.htmlindex 3bc6f77037..36f0fd8147 100644--- a/index.html+++ b/index.html@@ -31,7 +31,7 @@<link rel="stylesheet" href="css/modaldialog.css?v=3"><!--Link used for inline installation of chrome desktop streaming extension,- must contain the same extension id as defined in config.js -->+ is updated automatically from the code with the value defined in config.js --><link rel="chrome-webstore-item" href="https://chrome.google.com/webstore/detail/diibjkoicjeejcmhdnailmkgecihlobk"><script src="libs/jquery-impromptu.js"></script><script src="libs/jquery.autosize.js"></script>