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
feat: Drops external connect optimization. (#12958)
Дамян Минков8225f5e363aa
diff --git a/Makefile b/Makefileindex 32d14a9d7e..2872b34856 100644--- a/Makefile+++ b/Makefile@@ -44,8 +44,6 @@ deploy-appbundle:cp \$(BUILD_DIR)/app.bundle.min.js \$(BUILD_DIR)/app.bundle.min.js.map \- $(BUILD_DIR)/do_external_connect.min.js \- $(BUILD_DIR)/do_external_connect.min.js.map \$(BUILD_DIR)/external_api.min.js \$(BUILD_DIR)/external_api.min.js.map \$(BUILD_DIR)/alwaysontop.min.js \@@ -68,7 +66,6 @@ deploy-lib-jitsi-meet:$(LIBJITSIMEET_DIR)/dist/umd/lib-jitsi-meet.min.js \$(LIBJITSIMEET_DIR)/dist/umd/lib-jitsi-meet.min.map \$(LIBJITSIMEET_DIR)/dist/umd/lib-jitsi-meet.e2ee-worker.js \- $(LIBJITSIMEET_DIR)/connection_optimization/external_connect.js \$(LIBJITSIMEET_DIR)/modules/browser/capabilities.json \$(DEPLOY_DIR)@@ -129,7 +126,7 @@ dev: deploy-init deploy-css deploy-rnnoise-binary deploy-tflite deploy-meet-modesource-package:mkdir -p source_package/jitsi-meet/css && \- cp -r *.js *.html resources/*.txt connection_optimization favicon.ico fonts images libs static sounds LICENSE lang source_package/jitsi-meet && \+ cp -r *.js *.html resources/*.txt favicon.ico fonts images libs static sounds LICENSE lang source_package/jitsi-meet && \cp css/all.css source_package/jitsi-meet/css && \(cd source_package ; tar cjf ../jitsi-meet.tar.bz2 jitsi-meet) && \rm -rf source_packagediff --git a/app.js b/app.jsindex ac39d1c4c5..5cabc0be3a 100644--- a/app.js+++ b/app.js@@ -33,17 +33,6 @@ window.APP = {API,conference,- // Used by do_external_connect.js if we receive the attach data after- // connect was already executed. status property can be 'initialized',- // 'ready', or 'connecting'. We are interested in 'ready' status only which- // means that connect was executed but we have to wait for the attach data.- // In status 'ready' handler property will be set to a function that will- // finish the connect process when the attach data or error is received.- connect: {- handler: null,- status: 'initialized'- },-// Used for automated performance tests.connectionTimes: {'index.loaded': window.indexLoadedTimediff --git a/config.js b/config.jsindex 02647606ba..db811abe6a 100644--- a/config.js+++ b/config.js@@ -1372,7 +1372,6 @@ var config = {dialOutRegionUrldisableRemoteControldisplayJids- externalConnectUrle2eeLabelsfirefox_fake_devicegoogleApiApplicationClientIDdiff --git a/connection.js b/connection.jsindex 74ee7552fa..9b6f3f5d1d 100644--- a/connection.js+++ b/connection.js@@ -32,54 +32,6 @@ const logger = Logger.getLogger(__filename);*/export const DISCO_JIBRI_FEATURE = 'http://jitsi.org/protocol/jibri';-/**- * Checks if we have data to use attach instead of connect. If we have the data- * executes attach otherwise check if we have to wait for the data. If we have- * to wait for the attach data we are setting handler to APP.connect.handler- * which is going to be called when the attach data is received otherwise- * executes connect.- *- * @param {string} [id] user id- * @param {string} [password] password- * @param {string} [roomName] the name of the conference.- */-function checkForAttachParametersAndConnect(id, password, connection) {- if (window.XMPPAttachInfo) {- APP.connect.status = 'connecting';-- // When connection optimization is not deployed or enabled the default- // value will be window.XMPPAttachInfo.status = "error"- // If the connection optimization is deployed and enabled and there is- // a failure the value will be window.XMPPAttachInfo.status = "error"- if (window.XMPPAttachInfo.status === 'error') {- connection.connect({- id,- password- });-- return;- }-- const attachOptions = window.XMPPAttachInfo.data;-- if (attachOptions) {- connection.attach(attachOptions);- delete window.XMPPAttachInfo.data;- } else {- connection.connect({- id,- password- });- }- } else {- APP.connect.status = 'ready';- APP.connect.handler- = checkForAttachParametersAndConnect.bind(- null,- id, password, connection);- }-}-/*** Try to open connection using provided credentials.* @param {string} [id]@@ -182,7 +134,10 @@ export async function connect(id, password) {APP.store.dispatch(setPrejoinDisplayNameRequired());}- checkForAttachParametersAndConnect(id, password, connection);+ connection.connect({+ id,+ password+ });});}diff --git a/connection_optimization/.eslintrc.js b/connection_optimization/.eslintrc.jsdeleted file mode 100644index 05aee778fb..0000000000--- a/connection_optimization/.eslintrc.js+++ /dev/null@@ -1,3 +0,0 @@-module.exports = {- 'extends': '../react/.eslintrc.js'-};diff --git a/connection_optimization/connection_optimization.html b/connection_optimization/connection_optimization.htmldeleted file mode 100644index e69de29bb2..0000000000diff --git a/connection_optimization/do_external_connect.js b/connection_optimization/do_external_connect.jsdeleted file mode 100644index fbfcfdc210..0000000000--- a/connection_optimization/do_external_connect.js+++ /dev/null@@ -1,86 +0,0 @@-/* global config, createConnectionExternally */--import getRoomName from '../react/features/base/config/getRoomName';-import { parseURLParams } from '../react/features/base/util/parseURLParams';--/**- * Implements external connect using createConnectionExternally function defined- * in external_connect.js for Jitsi Meet. Parses the room name and JSON Web- * Token (JWT) from the URL and executes createConnectionExternally.- *- * NOTE: If you are using lib-jitsi-meet without Jitsi Meet, you should use this- * file as reference only because the implementation is Jitsi Meet-specific.- *- * NOTE: For optimal results this file should be included right after- * external_connect.js.- */--if (typeof createConnectionExternally === 'function') {- // URL params have higher priority than config params.- // Do not use external connect if websocket is enabled.- let url- = parseURLParams(window.location, true, 'hash')[- 'config.externalConnectUrl']- || config.websocket ? undefined : config.externalConnectUrl;- const isRecorder- = parseURLParams(window.location, true, 'hash')['config.iAmRecorder'];-- let roomName;-- if (url && (roomName = getRoomName()) && !isRecorder) {- url += `?room=${roomName}`;-- const token = parseURLParams(window.location, true, 'search').jwt;-- if (token) {- url += `&token=${token}`;- }-- createConnectionExternally(- url,- connectionInfo => {- // Sets that global variable to be used later by connect method- // in connection.js.- window.XMPPAttachInfo = {- status: 'success',- data: connectionInfo- };- checkForConnectHandlerAndConnect();- },- errorCallback);- } else {- errorCallback();- }-} else {- errorCallback();-}--/**- * Check if connect from connection.js was executed and executes the handler- * that is going to finish the connect work.- *- * @returns {void}- */-function checkForConnectHandlerAndConnect() {- window.APP- && window.APP.connect.status === 'ready'- && window.APP.connect.handler();-}--/**- * Implements a callback to be invoked if anything goes wrong.- *- * @param {Error} error - The specifics of what went wrong.- * @returns {void}- */-function errorCallback(error) {- // The value of error is undefined if external connect is disabled.- error && console.warn(error);-- // Sets that global variable to be used later by connect method in- // connection.js.- window.XMPPAttachInfo = {- status: 'error'- };- checkForConnectHandlerAndConnect();-}diff --git a/debian/jitsi-meet-web.install b/debian/jitsi-meet-web.installindex c66a2ada08..67965926ff 100644--- a/debian/jitsi-meet-web.install+++ b/debian/jitsi-meet-web.install@@ -8,7 +8,6 @@ sounds /usr/share/jitsi-meet/fonts /usr/share/jitsi-meet/images /usr/share/jitsi-meet/lang /usr/share/jitsi-meet/-connection_optimization /usr/share/jitsi-meet/resources/robots.txt /usr/share/jitsi-meet/resources/*.sh /usr/share/jitsi-meet/scripts/pwa-worker.js /usr/share/jitsi-meet/diff --git a/doc/debian/jitsi-meet/jitsi-meet.example b/doc/debian/jitsi-meet/jitsi-meet.exampleindex fd3914ecd8..bcf26688f9 100644--- a/doc/debian/jitsi-meet/jitsi-meet.example+++ b/doc/debian/jitsi-meet/jitsi-meet.example@@ -93,7 +93,7 @@ server {}# ensure all static content can always be found first- location ~ ^/(libs|css|static|images|fonts|lang|sounds|connection_optimization|.well-known)/(.*)$+ location ~ ^/(libs|css|static|images|fonts|lang|sounds|.well-known)/(.*)${add_header 'Access-Control-Allow-Origin' '*';alias /usr/share/jitsi-meet/$1/$2;diff --git a/index.html b/index.htmlindex f522516943..56d8ef0924 100644--- a/index.html+++ b/index.html@@ -182,8 +182,6 @@'error', loadErrHandler, true /* capture phase type of listener */);</script><script><!--#include virtual="/config.js" --></script><!-- adapt to your needs, i.e. set hosts and bosh path -->- <!--#include virtual="connection_optimization/connection_optimization.html" -->- <script src="libs/do_external_connect.min.js?v=1"></script><script><!--#include virtual="/interface_config.js" --></script><script src="libs/lib-jitsi-meet.min.js?v=139"></script><script src="libs/app.bundle.min.js?v=139"></script>diff --git a/package-lock.json b/package-lock.jsonindex 21a15533c4..d59579d2a3 100644--- a/package-lock.json+++ b/package-lock.json@@ -71,7 +71,7 @@"js-md5": "0.6.1","js-sha512": "0.8.0","jwt-decode": "2.2.0",- "lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1583.0.0+931ca368/lib-jitsi-meet.tgz",+ "lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1585.0.0+362d1b2c/lib-jitsi-meet.tgz","lodash": "4.17.21","moment": "2.29.4","moment-duration-format": "2.2.2",@@ -13399,8 +13399,8 @@},"node_modules/lib-jitsi-meet": {"version": "0.0.0",- "resolved": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1583.0.0+931ca368/lib-jitsi-meet.tgz",- "integrity": "sha512-lzgRkJtdlZ7bfq2seBuONRM6UND8NJVjMOZPlVoq7uP4UuxffBztsoHGc0g5Y5zEqi1AnfYLwVZZvXkpd82iew==",+ "resolved": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1585.0.0+362d1b2c/lib-jitsi-meet.tgz",+ "integrity": "sha512-g7JVvBfZixl1fKZI4ZMm3nvMasEz5sdapMzZdc76kA/eZSej2QuNK+W9cB8IypB7dqeTM4yzbfzi9rDipyWn+w==","license": "Apache-2.0","dependencies": {"@jitsi/js-utils": "2.0.0",@@ -30278,8 +30278,8 @@}},"lib-jitsi-meet": {- "version": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1583.0.0+931ca368/lib-jitsi-meet.tgz",- "integrity": "sha512-lzgRkJtdlZ7bfq2seBuONRM6UND8NJVjMOZPlVoq7uP4UuxffBztsoHGc0g5Y5zEqi1AnfYLwVZZvXkpd82iew==",+ "version": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1585.0.0+362d1b2c/lib-jitsi-meet.tgz",+ "integrity": "sha512-g7JVvBfZixl1fKZI4ZMm3nvMasEz5sdapMzZdc76kA/eZSej2QuNK+W9cB8IypB7dqeTM4yzbfzi9rDipyWn+w==","requires": {"@jitsi/js-utils": "2.0.0","@jitsi/logger": "2.0.0",diff --git a/package.json b/package.jsonindex 284c11e18d..8d497e9d1e 100644--- a/package.json+++ b/package.json@@ -76,7 +76,7 @@"js-md5": "0.6.1","js-sha512": "0.8.0","jwt-decode": "2.2.0",- "lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1583.0.0+931ca368/lib-jitsi-meet.tgz",+ "lib-jitsi-meet": "https://github.com/jitsi/lib-jitsi-meet/releases/download/v1585.0.0+362d1b2c/lib-jitsi-meet.tgz","lodash": "4.17.21","moment": "2.29.4","moment-duration-format": "2.2.2",diff --git a/webpack.config.js b/webpack.config.jsindex 2938fd4d79..d1309dd84c 100644--- a/webpack.config.js+++ b/webpack.config.js@@ -322,16 +322,6 @@ module.exports = (_env, argv) => {],performance: getPerformanceHints(perfHintOptions, 800 * 1024)}),- Object.assign({}, config, {- entry: {- 'do_external_connect': './connection_optimization/do_external_connect.js'- },- plugins: [- ...config.plugins,- ...getBundleAnalyzerPlugin(analyzeBundle, 'do_external_connect')- ],- performance: getPerformanceHints(perfHintOptions, 5 * 1024)- }),Object.assign({}, config, {entry: {'analytics-ga': './react/features/analytics/handlers/GoogleAnalyticsHandler.ts'