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
ref(screenshot-capture): move screenshot processing on a web worker (#14015)
Gabriel Borlea11f0ab922673
diff --git a/Makefile b/Makefileindex 08072762a5..895d9e9ac2 100644--- a/Makefile+++ b/Makefile@@ -55,6 +55,8 @@ deploy-appbundle:$(BUILD_DIR)/face-landmarks-worker.min.js.map \$(BUILD_DIR)/noise-suppressor-worklet.min.js \$(BUILD_DIR)/noise-suppressor-worklet.min.js.map \+ $(BUILD_DIR)/screenshot-capture-worker.min.js \+ $(BUILD_DIR)/screenshot-capture-worker.min.js.map \$(DEPLOY_DIR)cp \$(BUILD_DIR)/close3.min.js \diff --git a/package-lock.json b/package-lock.jsonindex c19f1889c8..87fdb7fc07 100644--- a/package-lock.json+++ b/package-lock.json@@ -65,6 +65,7 @@"moment-duration-format": "2.2.2","null-loader": "4.0.1","optional-require": "1.0.3",+ "pixelmatch": "5.3.0","promise.allsettled": "1.0.4","punycode": "2.3.0","react": "18.2.0",@@ -107,7 +108,6 @@"react-youtube": "10.1.0","redux": "4.0.4","redux-thunk": "2.4.1",- "resemblejs": "4.0.0","seamless-scroll-polyfill": "2.1.8","semver": "7.5.4","tss-react": "4.4.4",@@ -130,6 +130,8 @@"@types/dom-screen-wake-lock": "1.0.1","@types/js-md5": "0.4.3","@types/lodash": "4.14.182",+ "@types/offscreencanvas": "2019.7.2",+ "@types/pixelmatch": "5.2.5","@types/punycode": "2.1.0","@types/react": "17.0.14","@types/react-dom": "17.0.14",@@ -139,7 +141,6 @@"@types/react-native-video": "5.0.14","@types/react-redux": "7.1.24","@types/react-window": "1.8.5",- "@types/resemblejs": "^4.1.0","@types/unorm": "1.3.28","@types/uuid": "8.3.4","@types/w3c-image-capture": "1.0.6",@@ -3265,26 +3266,6 @@"@jridgewell/sourcemap-codec": "^1.4.14"}},- "node_modules/@mapbox/node-pre-gyp": {- "version": "1.0.8",- "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.8.tgz",- "integrity": "sha512-CMGKi28CF+qlbXh26hDe6NxCd7amqeAzEqnS6IHeO6LoaKyM/n+Xw3HT1COdq8cuioOdlKdqn/hCmqPUOMOywg==",- "optional": true,- "dependencies": {- "detect-libc": "^1.0.3",- "https-proxy-agent": "^5.0.0",- "make-dir": "^3.1.0",- "node-fetch": "^2.6.5",- "nopt": "^5.0.0",- "npmlog": "^5.0.1",- "rimraf": "^3.0.2",- "semver": "^7.3.5",- "tar": "^6.1.11"- },- "bin": {- "node-pre-gyp": "bin/node-pre-gyp"- }- },"node_modules/@matrix-org/olm": {"version": "3.2.3","resolved": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.3.tgz",@@ -5515,6 +5496,11 @@"yarn": ">= 1.3.2"}},+ "node_modules/@tensorflow/tfjs-core/node_modules/@types/offscreencanvas": {+ "version": "2019.3.0",+ "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.3.0.tgz",+ "integrity": "sha512-esIJx9bQg+QYF0ra8GnvfianIY8qWB0GBx54PK5Eps6m+xTj86KLavHv6qDhzKcu5UUOgNfJ2pWaIIV7TRUd9Q=="+ },"node_modules/@testrtc/watchrtc-sdk": {"version": "1.36.3","resolved": "https://registry.npmjs.org/@testrtc/watchrtc-sdk/-/watchrtc-sdk-1.36.3.tgz",@@ -5735,15 +5721,25 @@"integrity": "sha512-PfeQhvcMR4cPFVuYfBN4ifG7p9c+Dlh3yUZR6k+5yQK7wX3gDgVxBly4/WkBRs9x4dmcy1TVl08SY67wwtEvmA=="},"node_modules/@types/offscreencanvas": {- "version": "2019.3.0",- "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.3.0.tgz",- "integrity": "sha512-esIJx9bQg+QYF0ra8GnvfianIY8qWB0GBx54PK5Eps6m+xTj86KLavHv6qDhzKcu5UUOgNfJ2pWaIIV7TRUd9Q=="+ "version": "2019.7.2",+ "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.2.tgz",+ "integrity": "sha512-ujCjOxeA07IbEBQYAkoOI+XFw5sT3nhWJ/xZfPR6reJppDG7iPQPZacQiLTtWH1b3a2NYXWlxvYqa40y/LAixQ==",+ "dev": true},"node_modules/@types/parse-json": {"version": "4.0.0","resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz","integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA=="},+ "node_modules/@types/pixelmatch": {+ "version": "5.2.5",+ "resolved": "https://registry.npmjs.org/@types/pixelmatch/-/pixelmatch-5.2.5.tgz",+ "integrity": "sha512-di/HknmWA+KNjlLczJiLft9g1mHJZl5qGAXtDct8KsJg8KPrXKJa8Avumj53fgdJOBbfHABYhp3EjyitmKPdBg==",+ "dev": true,+ "dependencies": {+ "@types/node": "*"+ }+ },"node_modules/@types/prop-types": {"version": "15.7.5","resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz",@@ -5859,12 +5855,6 @@"@types/react": "*"}},- "node_modules/@types/resemblejs": {- "version": "4.1.0",- "resolved": "https://registry.npmjs.org/@types/resemblejs/-/resemblejs-4.1.0.tgz",- "integrity": "sha512-+MIkKy/UngDfhTnvn2yK/KSzlbtLeB5BU73qqZrzIF24+e2r8enJ4cW3UbtkstByYSDV8pbheGAqg7zT8ZZ2pA==",- "dev": true- },"node_modules/@types/retry": {"version": "0.12.1","resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.1.tgz",@@ -6540,12 +6530,6 @@"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz","integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA=="},- "node_modules/abbrev": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",- "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",- "optional": true- },"node_modules/abort-controller": {"version": "3.0.0","resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",@@ -6613,18 +6597,6 @@"node": ">=0.4.0"}},- "node_modules/agent-base": {- "version": "6.0.2",- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",- "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",- "optional": true,- "dependencies": {- "debug": "4"- },- "engines": {- "node": ">= 6.0.0"- }- },"node_modules/aggregate-error": {"version": "3.1.0","resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",@@ -6823,25 +6795,6 @@"extend": "^3.0.2"}},- "node_modules/aproba": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",- "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==",- "optional": true- },- "node_modules/are-we-there-yet": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",- "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==",- "optional": true,- "dependencies": {- "delegates": "^1.0.0",- "readable-stream": "^3.6.0"- },- "engines": {- "node": ">=10"- }- },"node_modules/argparse": {"version": "1.0.10","resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",@@ -7674,21 +7627,6 @@}]},- "node_modules/canvas": {- "version": "2.8.0",- "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.8.0.tgz",- "integrity": "sha512-gLTi17X8WY9Cf5GZ2Yns8T5lfBOcGgFehDFb+JQwDqdOoBOcECS9ZWMEAqMSVcMYwXD659J8NyzjRY/2aE+C2Q==",- "hasInstallScript": true,- "optional": true,- "dependencies": {- "@mapbox/node-pre-gyp": "^1.0.0",- "nan": "^2.14.0",- "simple-get": "^3.0.3"- },- "engines": {- "node": ">=6"- }- },"node_modules/chalk": {"version": "2.4.2","resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",@@ -7747,15 +7685,6 @@"node": ">= 6"}},- "node_modules/chownr": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",- "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",- "optional": true,- "engines": {- "node": ">=10"- }- },"node_modules/chrome-trace-event": {"version": "1.0.3","resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz",@@ -8047,15 +7976,6 @@"simple-swizzle": "^0.2.2"}},- "node_modules/color-support": {- "version": "1.1.3",- "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",- "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",- "optional": true,- "bin": {- "color-support": "bin.js"- }- },"node_modules/colorette": {"version": "1.4.0","resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz",@@ -8172,12 +8092,6 @@"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz","integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A=="},- "node_modules/console-control-strings": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",- "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",- "optional": true- },"node_modules/content-disposition": {"version": "0.5.4","resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",@@ -8486,18 +8400,6 @@"node": ">=0.10"}},- "node_modules/decompress-response": {- "version": "4.2.1",- "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz",- "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==",- "optional": true,- "dependencies": {- "mimic-response": "^2.0.0"- },- "engines": {- "node": ">=8"- }- },"node_modules/deep-equal": {"version": "1.1.1","resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz",@@ -8678,12 +8580,6 @@"node": ">=8"}},- "node_modules/delegates": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",- "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",- "optional": true- },"node_modules/denodeify": {"version": "1.2.1","resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz",@@ -8712,18 +8608,6 @@"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz","integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="},- "node_modules/detect-libc": {- "version": "1.0.3",- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",- "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",- "optional": true,- "bin": {- "detect-libc": "bin/detect-libc.js"- },- "engines": {- "node": ">=0.10"- }- },"node_modules/detect-node": {"version": "2.1.0","resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz",@@ -10531,18 +10415,6 @@"node": ">=6 <7 || >=8"}},- "node_modules/fs-minipass": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",- "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",- "optional": true,- "dependencies": {- "minipass": "^3.0.0"- },- "engines": {- "node": ">= 8"- }- },"node_modules/fs-monkey": {"version": "1.0.3","resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.3.tgz",@@ -10597,26 +10469,6 @@"url": "https://github.com/sponsors/ljharb"}},- "node_modules/gauge": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz",- "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==",- "optional": true,- "dependencies": {- "aproba": "^1.0.3 || ^2.0.0",- "color-support": "^1.1.2",- "console-control-strings": "^1.0.0",- "has-unicode": "^2.0.1",- "object-assign": "^4.1.1",- "signal-exit": "^3.0.0",- "string-width": "^4.2.3",- "strip-ansi": "^6.0.1",- "wide-align": "^1.1.2"- },- "engines": {- "node": ">=10"- }- },"node_modules/gensync": {"version": "1.0.0-beta.2","resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",@@ -10892,12 +10744,6 @@"url": "https://github.com/sponsors/ljharb"}},- "node_modules/has-unicode": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",- "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",- "optional": true- },"node_modules/has-value": {"version": "1.0.0","resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",@@ -11139,19 +10985,6 @@"url": "https://github.com/sponsors/sindresorhus"}},- "node_modules/https-proxy-agent": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz",- "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==",- "optional": true,- "dependencies": {- "agent-base": "6",- "debug": "4"- },- "engines": {- "node": ">= 6"- }- },"node_modules/human-signals": {"version": "2.1.0","resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",@@ -13254,7 +13087,7 @@"version": "3.1.0","resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz","integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",- "devOptional": true,+ "dev": true,"dependencies": {"semver": "^6.0.0"},@@ -13269,7 +13102,7 @@"version": "6.3.1","resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz","integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",- "devOptional": true,+ "dev": true,"bin": {"semver": "bin/semver.js"}@@ -13983,18 +13816,6 @@"node": ">=6"}},- "node_modules/mimic-response": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz",- "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==",- "optional": true,- "engines": {- "node": ">=8"- },- "funding": {- "url": "https://github.com/sponsors/sindresorhus"- }- },"node_modules/minimalistic-assert": {"version": "1.0.1","resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",@@ -14017,31 +13838,6 @@"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz","integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="},- "node_modules/minipass": {- "version": "3.1.6",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz",- "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==",- "optional": true,- "dependencies": {- "yallist": "^4.0.0"- },- "engines": {- "node": ">=8"- }- },- "node_modules/minizlib": {- "version": "2.1.2",- "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",- "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",- "optional": true,- "dependencies": {- "minipass": "^3.0.0",- "yallist": "^4.0.0"- },- "engines": {- "node": ">= 8"- }- },"node_modules/mixin-deep": {"version": "1.3.2","resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",@@ -14111,12 +13907,6 @@"integrity": "sha512-cnAsSVxIDsYt0v7HmC0hWZFwwXSh+E6PgCrREDuN/EsjgLwA5XRmlMHhSiDPrt6HxY1gTivEa/Zh7GtODoLevQ==","dev": true},- "node_modules/nan": {- "version": "2.15.0",- "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz",- "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==",- "optional": true- },"node_modules/nano-css": {"version": "5.3.5","resolved": "https://registry.npmjs.org/nano-css/-/nano-css-5.3.5.tgz",@@ -14287,21 +14077,6 @@"url": "https://github.com/sponsors/antelle"}},- "node_modules/nopt": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz",- "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",- "optional": true,- "dependencies": {- "abbrev": "1"- },- "bin": {- "nopt": "bin/nopt.js"- },- "engines": {- "node": ">=6"- }- },"node_modules/normalize-path": {"version": "3.0.0","resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",@@ -14329,18 +14104,6 @@"node": ">=4"}},- "node_modules/npmlog": {- "version": "5.0.1",- "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz",- "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==",- "optional": true,- "dependencies": {- "are-we-there-yet": "^2.0.0",- "console-control-strings": "^1.1.0",- "gauge": "^3.0.0",- "set-blocking": "^2.0.0"- }- },"node_modules/nth-check": {"version": "2.1.1","resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",@@ -15121,6 +14884,17 @@"node": ">= 6"}},+ "node_modules/pixelmatch": {+ "version": "5.3.0",+ "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-5.3.0.tgz",+ "integrity": "sha512-o8mkY4E/+LNUf6LzX96ht6k6CEDi65k9G2rjMtBe9Oo+VPKSvl+0GKHuH/AlG+GA5LPG/i5hrekkxUc3s2HU+Q==",+ "dependencies": {+ "pngjs": "^6.0.0"+ },+ "bin": {+ "pixelmatch": "bin/pixelmatch"+ }+ },"node_modules/pkg-dir": {"version": "4.2.0","resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",@@ -15146,6 +14920,14 @@"node": ">=10.4.0"}},+ "node_modules/pngjs": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-6.0.0.tgz",+ "integrity": "sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28K/m5bjBWKsC29KyoMfHbypayg==",+ "engines": {+ "node": ">=12.13.0"+ }+ },"node_modules/portfinder": {"version": "1.0.28","resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz",@@ -17096,14 +16878,6 @@"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=","dev": true},- "node_modules/resemblejs": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/resemblejs/-/resemblejs-4.0.0.tgz",- "integrity": "sha512-vaGs/hFVx/941+RS4UJtd8DQvx5RuB61tPLOQCxPso3JpmjfDb6odH5HViT17S0d8DaZsexD01nRJI12giCz/A==",- "optionalDependencies": {- "canvas": "2.8.0"- }- },"node_modules/resize-observer-polyfill": {"version": "1.5.1","resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",@@ -17203,7 +16977,7 @@"version": "3.0.2","resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz","integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",- "devOptional": true,+ "dev": true,"dependencies": {"glob": "^7.1.3"},@@ -17636,37 +17410,6 @@"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz","integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="},- "node_modules/simple-concat": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",- "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",- "funding": [- {- "type": "github",- "url": "https://github.com/sponsors/feross"- },- {- "type": "patreon",- "url": "https://www.patreon.com/feross"- },- {- "type": "consulting",- "url": "https://feross.org/support"- }- ],- "optional": true- },- "node_modules/simple-get": {- "version": "3.1.1",- "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz",- "integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==",- "optional": true,- "dependencies": {- "decompress-response": "^4.2.0",- "once": "^1.3.1",- "simple-concat": "^1.0.0"- }- },"node_modules/simple-swizzle": {"version": "0.2.2","resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",@@ -18529,35 +18272,6 @@"node": ">=6"}},- "node_modules/tar": {- "version": "6.1.11",- "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz",- "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==",- "optional": true,- "dependencies": {- "chownr": "^2.0.0",- "fs-minipass": "^2.0.0",- "minipass": "^3.0.0",- "minizlib": "^2.1.1",- "mkdirp": "^1.0.3",- "yallist": "^4.0.0"- },- "engines": {- "node": ">= 10"- }- },- "node_modules/tar/node_modules/mkdirp": {- "version": "1.0.4",- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",- "optional": true,- "bin": {- "mkdirp": "bin/cmd.js"- },- "engines": {- "node": ">=10"- }- },"node_modules/temp": {"version": "0.8.3","resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz",@@ -20260,15 +19974,6 @@"url": "https://github.com/sponsors/ljharb"}},- "node_modules/wide-align": {- "version": "1.1.5",- "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",- "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",- "optional": true,- "dependencies": {- "string-width": "^1.0.2 || 2 || 3 || 4"- }- },"node_modules/wildcard": {"version": "2.0.0","resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz",@@ -22674,23 +22379,6 @@"@jridgewell/sourcemap-codec": "^1.4.14"}},- "@mapbox/node-pre-gyp": {- "version": "1.0.8",- "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.8.tgz",- "integrity": "sha512-CMGKi28CF+qlbXh26hDe6NxCd7amqeAzEqnS6IHeO6LoaKyM/n+Xw3HT1COdq8cuioOdlKdqn/hCmqPUOMOywg==",- "optional": true,- "requires": {- "detect-libc": "^1.0.3",- "https-proxy-agent": "^5.0.0",- "make-dir": "^3.1.0",- "node-fetch": "^2.6.5",- "nopt": "^5.0.0",- "npmlog": "^5.0.1",- "rimraf": "^3.0.2",- "semver": "^7.3.5",- "tar": "^6.1.11"- }- },"@matrix-org/olm": {"version": "https://gitlab.matrix.org/api/v4/projects/27/packages/npm/@matrix-org/olm/-/@matrix-org/olm-3.2.3.tgz","integrity": "sha512-OhC9wwZ/ox9vputA1MR2A7QlYlvfXCV+tdbADOR7Jn7o9qoXh3HWf+AbSpXTK3daF0GIHA69Ws8XOnWqu5n53A=="@@ -24235,6 +23923,13 @@"long": "4.0.0","node-fetch": "~2.6.1","seedrandom": "2.4.3"+ },+ "dependencies": {+ "@types/offscreencanvas": {+ "version": "2019.3.0",+ "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.3.0.tgz",+ "integrity": "sha512-esIJx9bQg+QYF0ra8GnvfianIY8qWB0GBx54PK5Eps6m+xTj86KLavHv6qDhzKcu5UUOgNfJ2pWaIIV7TRUd9Q=="+ }}},"@testrtc/watchrtc-sdk": {@@ -24454,15 +24149,25 @@"integrity": "sha512-PfeQhvcMR4cPFVuYfBN4ifG7p9c+Dlh3yUZR6k+5yQK7wX3gDgVxBly4/WkBRs9x4dmcy1TVl08SY67wwtEvmA=="},"@types/offscreencanvas": {- "version": "2019.3.0",- "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.3.0.tgz",- "integrity": "sha512-esIJx9bQg+QYF0ra8GnvfianIY8qWB0GBx54PK5Eps6m+xTj86KLavHv6qDhzKcu5UUOgNfJ2pWaIIV7TRUd9Q=="+ "version": "2019.7.2",+ "resolved": "https://registry.npmjs.org/@types/offscreencanvas/-/offscreencanvas-2019.7.2.tgz",+ "integrity": "sha512-ujCjOxeA07IbEBQYAkoOI+XFw5sT3nhWJ/xZfPR6reJppDG7iPQPZacQiLTtWH1b3a2NYXWlxvYqa40y/LAixQ==",+ "dev": true},"@types/parse-json": {"version": "4.0.0","resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz","integrity": "sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA=="},+ "@types/pixelmatch": {+ "version": "5.2.5",+ "resolved": "https://registry.npmjs.org/@types/pixelmatch/-/pixelmatch-5.2.5.tgz",+ "integrity": "sha512-di/HknmWA+KNjlLczJiLft9g1mHJZl5qGAXtDct8KsJg8KPrXKJa8Avumj53fgdJOBbfHABYhp3EjyitmKPdBg==",+ "dev": true,+ "requires": {+ "@types/node": "*"+ }+ },"@types/prop-types": {"version": "15.7.5","resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.5.tgz",@@ -24578,12 +24283,6 @@"@types/react": "*"}},- "@types/resemblejs": {- "version": "4.1.0",- "resolved": "https://registry.npmjs.org/@types/resemblejs/-/resemblejs-4.1.0.tgz",- "integrity": "sha512-+MIkKy/UngDfhTnvn2yK/KSzlbtLeB5BU73qqZrzIF24+e2r8enJ4cW3UbtkstByYSDV8pbheGAqg7zT8ZZ2pA==",- "dev": true- },"@types/retry": {"version": "0.12.1","resolved": "https://registry.npmjs.org/@types/retry/-/retry-0.12.1.tgz",@@ -25091,12 +24790,6 @@"resolved": "https://registry.npmjs.org/abab/-/abab-2.0.6.tgz","integrity": "sha512-j2afSsaIENvHZN2B8GOpF566vZ5WVk5opAiMTvWgaQT8DkbOqsTfvNAvHoRGU2zzP8cPoqys+xHTRDWW8L+/BA=="},- "abbrev": {- "version": "1.1.1",- "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",- "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==",- "optional": true- },"abort-controller": {"version": "3.0.0","resolved": "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz",@@ -25143,15 +24836,6 @@"integrity": "sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA==","dev": true},- "agent-base": {- "version": "6.0.2",- "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz",- "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==",- "optional": true,- "requires": {- "debug": "4"- }- },"aggregate-error": {"version": "3.1.0","resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.1.0.tgz",@@ -25306,22 +24990,6 @@"extend": "^3.0.2"}},- "aproba": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz",- "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==",- "optional": true- },- "are-we-there-yet": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz",- "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==",- "optional": true,- "requires": {- "delegates": "^1.0.0",- "readable-stream": "^3.6.0"- }- },"argparse": {"version": "1.0.10","resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz",@@ -25942,17 +25610,6 @@"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001524.tgz","integrity": "sha512-Jj917pJtYg9HSJBF95HVX3Cdr89JUyLT4IZ8SvM5aDRni95swKgYi3TgYLH5hnGfPE/U1dg6IfZ50UsIlLkwSA=="},- "canvas": {- "version": "2.8.0",- "resolved": "https://registry.npmjs.org/canvas/-/canvas-2.8.0.tgz",- "integrity": "sha512-gLTi17X8WY9Cf5GZ2Yns8T5lfBOcGgFehDFb+JQwDqdOoBOcECS9ZWMEAqMSVcMYwXD659J8NyzjRY/2aE+C2Q==",- "optional": true,- "requires": {- "@mapbox/node-pre-gyp": "^1.0.0",- "nan": "^2.14.0",- "simple-get": "^3.0.3"- }- },"chalk": {"version": "2.4.2","resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz",@@ -25995,12 +25652,6 @@}}},- "chownr": {- "version": "2.0.0",- "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz",- "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==",- "optional": true- },"chrome-trace-event": {"version": "1.0.3","resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz",@@ -26217,12 +25868,6 @@"simple-swizzle": "^0.2.2"}},- "color-support": {- "version": "1.1.3",- "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz",- "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==",- "optional": true- },"colorette": {"version": "1.4.0","resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz",@@ -26328,12 +25973,6 @@"integrity": "sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg==","dev": true},- "console-control-strings": {- "version": "1.1.0",- "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",- "integrity": "sha1-PXz0Rk22RG6mRL9LOVB/mFEAjo4=",- "optional": true- },"content-disposition": {"version": "0.5.4","resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz",@@ -26562,15 +26201,6 @@"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz","integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ=="},- "decompress-response": {- "version": "4.2.1",- "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-4.2.1.tgz",- "integrity": "sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw==",- "optional": true,- "requires": {- "mimic-response": "^2.0.0"- }- },"deep-equal": {"version": "1.1.1","resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz",@@ -26701,12 +26331,6 @@}}},- "delegates": {- "version": "1.0.0",- "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz",- "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=",- "optional": true- },"denodeify": {"version": "1.2.1","resolved": "https://registry.npmjs.org/denodeify/-/denodeify-1.2.1.tgz",@@ -26732,12 +26356,6 @@"resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz","integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA="},- "detect-libc": {- "version": "1.0.3",- "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-1.0.3.tgz",- "integrity": "sha1-+hN8S9aY7fVc1c0CrFWfkaTEups=",- "optional": true- },"detect-node": {"version": "2.1.0","resolved": "https://registry.npmjs.org/detect-node/-/detect-node-2.1.0.tgz",@@ -28126,15 +27744,6 @@"universalify": "^0.1.0"}},- "fs-minipass": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz",- "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==",- "optional": true,- "requires": {- "minipass": "^3.0.0"- }- },"fs-monkey": {"version": "1.0.3","resolved": "https://registry.npmjs.org/fs-monkey/-/fs-monkey-1.0.3.tgz",@@ -28173,23 +27782,6 @@"resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz","integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ=="},- "gauge": {- "version": "3.0.2",- "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz",- "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==",- "optional": true,- "requires": {- "aproba": "^1.0.3 || ^2.0.0",- "color-support": "^1.1.2",- "console-control-strings": "^1.0.0",- "has-unicode": "^2.0.1",- "object-assign": "^4.1.1",- "signal-exit": "^3.0.0",- "string-width": "^4.2.3",- "strip-ansi": "^6.0.1",- "wide-align": "^1.1.2"- }- },"gensync": {"version": "1.0.0-beta.2","resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz",@@ -28377,12 +27969,6 @@"has-symbols": "^1.0.2"}},- "has-unicode": {- "version": "2.0.1",- "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz",- "integrity": "sha1-4Ob+aijPUROIVeCG0Wkedx3iqLk=",- "optional": true- },"has-value": {"version": "1.0.0","resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz",@@ -28592,16 +28178,6 @@}}},- "https-proxy-agent": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz",- "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==",- "optional": true,- "requires": {- "agent-base": "6",- "debug": "4"- }- },"human-signals": {"version": "2.1.0","resolved": "https://registry.npmjs.org/human-signals/-/human-signals-2.1.0.tgz",@@ -30175,7 +29751,7 @@"version": "3.1.0","resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz","integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==",- "devOptional": true,+ "dev": true,"requires": {"semver": "^6.0.0"},@@ -30184,7 +29760,7 @@"version": "6.3.1","resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz","integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",- "devOptional": true+ "dev": true}}},@@ -30784,12 +30360,6 @@"resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz","integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg=="},- "mimic-response": {- "version": "2.1.0",- "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-2.1.0.tgz",- "integrity": "sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA==",- "optional": true- },"minimalistic-assert": {"version": "1.0.1","resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz",@@ -30809,25 +30379,6 @@"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz","integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q=="},- "minipass": {- "version": "3.1.6",- "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz",- "integrity": "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==",- "optional": true,- "requires": {- "yallist": "^4.0.0"- }- },- "minizlib": {- "version": "2.1.2",- "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz",- "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==",- "optional": true,- "requires": {- "minipass": "^3.0.0",- "yallist": "^4.0.0"- }- },"mixin-deep": {"version": "1.3.2","resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz",@@ -30882,12 +30433,6 @@"integrity": "sha512-cnAsSVxIDsYt0v7HmC0hWZFwwXSh+E6PgCrREDuN/EsjgLwA5XRmlMHhSiDPrt6HxY1gTivEa/Zh7GtODoLevQ==","dev": true},- "nan": {- "version": "2.15.0",- "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz",- "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==",- "optional": true- },"nano-css": {"version": "5.3.5","resolved": "https://registry.npmjs.org/nano-css/-/nano-css-5.3.5.tgz",@@ -31011,15 +30556,6 @@"resolved": "https://registry.npmjs.org/node-stream-zip/-/node-stream-zip-1.15.0.tgz","integrity": "sha512-LN4fydt9TqhZhThkZIVQnF9cwjU3qmUH9h78Mx/K7d3VvfRqqwthLwJEUOEL0QPZ0XQmNN7be5Ggit5+4dq3Bw=="},- "nopt": {- "version": "5.0.0",- "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz",- "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==",- "optional": true,- "requires": {- "abbrev": "1"- }- },"normalize-path": {"version": "3.0.0","resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",@@ -31040,18 +30576,6 @@}}},- "npmlog": {- "version": "5.0.1",- "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz",- "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==",- "optional": true,- "requires": {- "are-we-there-yet": "^2.0.0",- "console-control-strings": "^1.1.0",- "gauge": "^3.0.0",- "set-blocking": "^2.0.0"- }- },"nth-check": {"version": "2.1.1","resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz",@@ -31608,6 +31132,14 @@"resolved": "https://registry.npmjs.org/pirates/-/pirates-4.0.5.tgz","integrity": "sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ=="},+ "pixelmatch": {+ "version": "5.3.0",+ "resolved": "https://registry.npmjs.org/pixelmatch/-/pixelmatch-5.3.0.tgz",+ "integrity": "sha512-o8mkY4E/+LNUf6LzX96ht6k6CEDi65k9G2rjMtBe9Oo+VPKSvl+0GKHuH/AlG+GA5LPG/i5hrekkxUc3s2HU+Q==",+ "requires": {+ "pngjs": "^6.0.0"+ }+ },"pkg-dir": {"version": "4.2.0","resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz",@@ -31627,6 +31159,11 @@"xmlbuilder": "^15.1.1"}},+ "pngjs": {+ "version": "6.0.0",+ "resolved": "https://registry.npmjs.org/pngjs/-/pngjs-6.0.0.tgz",+ "integrity": "sha512-TRzzuFRRmEoSW/p1KVAmiOgPco2Irlah+bGFCeNfJXxxYGwSw7YwAOAcd7X28K/m5bjBWKsC29KyoMfHbypayg=="+ },"portfinder": {"version": "1.0.28","resolved": "https://registry.npmjs.org/portfinder/-/portfinder-1.0.28.tgz",@@ -32939,14 +32476,6 @@"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=","dev": true},- "resemblejs": {- "version": "4.0.0",- "resolved": "https://registry.npmjs.org/resemblejs/-/resemblejs-4.0.0.tgz",- "integrity": "sha512-vaGs/hFVx/941+RS4UJtd8DQvx5RuB61tPLOQCxPso3JpmjfDb6odH5HViT17S0d8DaZsexD01nRJI12giCz/A==",- "requires": {- "canvas": "2.8.0"- }- },"resize-observer-polyfill": {"version": "1.5.1","resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",@@ -33019,7 +32548,7 @@"version": "3.0.2","resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz","integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",- "devOptional": true,+ "dev": true,"requires": {"glob": "^7.1.3"}@@ -33358,23 +32887,6 @@"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz","integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ=="},- "simple-concat": {- "version": "1.0.1",- "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz",- "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==",- "optional": true- },- "simple-get": {- "version": "3.1.1",- "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-3.1.1.tgz",- "integrity": "sha512-CQ5LTKGfCpvE1K0n2us+kuMPbk/q0EKl82s4aheV9oXjFEz6W/Y7oQFVJuU6QG77hRT4Ghb5RURteF5vnWjupA==",- "optional": true,- "requires": {- "decompress-response": "^4.2.0",- "once": "^1.3.1",- "simple-concat": "^1.0.0"- }- },"simple-swizzle": {"version": "0.2.2","resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",@@ -34047,28 +33559,6 @@"integrity": "sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ==","dev": true},- "tar": {- "version": "6.1.11",- "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz",- "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==",- "optional": true,- "requires": {- "chownr": "^2.0.0",- "fs-minipass": "^2.0.0",- "minipass": "^3.0.0",- "minizlib": "^2.1.1",- "mkdirp": "^1.0.3",- "yallist": "^4.0.0"- },- "dependencies": {- "mkdirp": {- "version": "1.0.4",- "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz",- "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==",- "optional": true- }- }- },"temp": {"version": "0.8.3","resolved": "https://registry.npmjs.org/temp/-/temp-0.8.3.tgz",@@ -35262,15 +34752,6 @@"is-typed-array": "^1.1.10"}},- "wide-align": {- "version": "1.1.5",- "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz",- "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==",- "optional": true,- "requires": {- "string-width": "^1.0.2 || 2 || 3 || 4"- }- },"wildcard": {"version": "2.0.0","resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz",diff --git a/package.json b/package.jsonindex 1248e5bb40..1bf7cb2efd 100644--- a/package.json+++ b/package.json@@ -71,6 +71,7 @@"moment-duration-format": "2.2.2","null-loader": "4.0.1","optional-require": "1.0.3",+ "pixelmatch": "5.3.0","promise.allsettled": "1.0.4","punycode": "2.3.0","react": "18.2.0",@@ -113,7 +114,6 @@"react-youtube": "10.1.0","redux": "4.0.4","redux-thunk": "2.4.1",- "resemblejs": "4.0.0","seamless-scroll-polyfill": "2.1.8","semver": "7.5.4","tss-react": "4.4.4",@@ -136,6 +136,8 @@"@types/dom-screen-wake-lock": "1.0.1","@types/js-md5": "0.4.3","@types/lodash": "4.14.182",+ "@types/offscreencanvas": "2019.7.2",+ "@types/pixelmatch": "5.2.5","@types/punycode": "2.1.0","@types/react": "17.0.14","@types/react-dom": "17.0.14",@@ -145,7 +147,6 @@"@types/react-native-video": "5.0.14","@types/react-redux": "7.1.24","@types/react-window": "1.8.5",- "@types/resemblejs": "^4.1.0","@types/unorm": "1.3.28","@types/uuid": "8.3.4","@types/w3c-image-capture": "1.0.6",diff --git a/react/features/screenshot-capture/ScreenshotCaptureSummary.tsx b/react/features/screenshot-capture/ScreenshotCaptureSummary.tsxindex 4c52f26332..5913d6c30b 100644--- a/react/features/screenshot-capture/ScreenshotCaptureSummary.tsx+++ b/react/features/screenshot-capture/ScreenshotCaptureSummary.tsx@@ -1,5 +1,5 @@-import resemble from 'resemblejs';import 'image-capture';+import JitsiTrack from 'lib-jitsi-meet/types/auto/modules/RTC/JitsiTrack';import './createImageBitmap';import { createScreensharingCaptureTakenEvent } from '../analytics/AnalyticsEvents';@@ -7,20 +7,20 @@ import { sendAnalytics } from '../analytics/functions';import { IReduxState } from '../app/types';import { getCurrentConference } from '../base/conference/functions';import { getLocalParticipant, getRemoteParticipants } from '../base/participants/functions';-import { ITrack } from '../base/tracks/types';+import { getBaseUrl } from '../base/util/helpers';import { extractFqnFromPath } from '../dynamic-branding/functions.any';import {- CLEAR_INTERVAL,- INTERVAL_TIMEOUT,- PERCENTAGE_LOWER_BOUND,+ CLEAR_TIMEOUT,POLL_INTERVAL,- SET_INTERVAL+ SCREENSHOT_QUEUE_LIMIT,+ SET_TIMEOUT,+ TIMEOUT_TICK} from './constants';+import logger from './logger';// eslint-disable-next-line lines-around-comment// @ts-ignoreimport { processScreenshot } from './processScreenshot';-import { timerWorkerScript } from './worker';declare let ImageCapture: any;@@ -30,14 +30,10 @@ declare let ImageCapture: any;*/export default class ScreenshotCaptureSummary {_state: IReduxState;- _currentCanvas: HTMLCanvasElement;- _currentCanvasContext: CanvasRenderingContext2D | null;_initializedRegion: boolean;- _imageCapture: any;+ _imageCapture: ImageCapture;_streamWorker: Worker;- _streamHeight: any;- _streamWidth: any;- _storedImageData?: ImageData;+ _queue: Blob[];/*** Initializes a new {@code ScreenshotCaptureEffect} instance.@@ -46,16 +42,17 @@ export default class ScreenshotCaptureSummary {*/constructor(state: IReduxState) {this._state = state;- this._currentCanvas = document.createElement('canvas');- this._currentCanvasContext = this._currentCanvas.getContext('2d');// Bind handlers such that they access the same instance.this._handleWorkerAction = this._handleWorkerAction.bind(this);- this._initScreenshotCapture = this._initScreenshotCapture.bind(this);- this._streamWorker = new Worker(timerWorkerScript, { name: 'Screenshot capture worker' });+ const baseUrl = `${getBaseUrl()}libs/`;+ const workerUrl = `${baseUrl}screenshot-capture-worker.min.js`;++ this._streamWorker = new Worker(workerUrl, { name: 'Screenshot capture worker' });this._streamWorker.onmessage = this._handleWorkerAction;this._initializedRegion = false;+ this._queue = [];}/**@@ -77,10 +74,17 @@ export default class ScreenshotCaptureSummary {...jwt && { 'Authorization': `Bearer ${jwt}` }};- await fetch(`${_screenshotHistoryRegionUrl}/${sessionId}`, {- method: 'POST',- headers- });+ try {+ await fetch(`${_screenshotHistoryRegionUrl}/${sessionId}`, {+ method: 'POST',+ headers+ });+ } catch (err) {+ logger.warn(`Could not create screenshot region: ${err}`);++ return;+ }+this._initializedRegion = true;}@@ -88,31 +92,27 @@ export default class ScreenshotCaptureSummary {/*** Starts the screenshot capture event on a loop.*- * @param {Track} track - The track that contains the stream from which screenshots are to be sent.+ * @param {JitsiTrack} jitsiTrack - The track that contains the stream from which screenshots are to be sent.* @returns {Promise} - Promise that resolves once effect has started or rejects if the* videoType parameter is not desktop.*/- async start(track: ITrack) {- const { videoType } = track;- const stream = track.getOriginalStream();+ async start(jitsiTrack: JitsiTrack) {+ if (!window.OffscreenCanvas) {+ logger.warn('Can\'t start screenshot capture, OffscreenCanvas is not available');- if (videoType !== 'desktop') {return;}- const desktopTrack = stream.getVideoTracks()[0];- const { height, width }- = desktopTrack.getSettings() ?? desktopTrack.getConstraints();+ const { videoType, track } = jitsiTrack;- this._streamHeight = height;- this._streamWidth = width;- this._currentCanvas.height = parseInt(height, 10);- this._currentCanvas.width = parseInt(width, 10);- this._imageCapture = new ImageCapture(desktopTrack);+ if (videoType !== 'desktop') {+ return;+ }+ this._imageCapture = new ImageCapture(track);if (!this._initializedRegion) {await this._initRegionSelection();}- this._initScreenshotCapture();+ this.sendTimeout();}/**@@ -121,28 +121,34 @@ export default class ScreenshotCaptureSummary {* @returns {void}*/stop() {- this._streamWorker.postMessage({ id: CLEAR_INTERVAL });+ this._streamWorker.postMessage({ id: CLEAR_TIMEOUT });}/**- * Method that is called as soon as the first frame of the video loads from stream.- * The method is used to store the {@code ImageData} object from the first frames- * in order to use it for future comparisons based on which we can process only certain- * screenshots.+ * Sends to worker the imageBitmap for the next timeout.*- * @private- * @returns {void}+ * @returns {Promise<void>}*/- async _initScreenshotCapture() {- const imageBitmap = await this._imageCapture.grabFrame();+ async sendTimeout() {+ let imageBitmap: ImageBitmap | undefined;- this._currentCanvasContext?.drawImage(imageBitmap, 0, 0, this._streamWidth, this._streamHeight);- const imageData = this._currentCanvasContext?.getImageData(0, 0, this._streamWidth, this._streamHeight);+ if (!this._imageCapture.track || this._imageCapture.track.readyState !== 'live') {+ logger.warn('Track is in invalid state');+ this.stop();++ return;+ }++ try {+ imageBitmap = await this._imageCapture.grabFrame();+ } catch (e) {+ // ignore error+ }- this._storedImageData = imageData;this._streamWorker.postMessage({- id: SET_INTERVAL,- timeMs: POLL_INTERVAL+ id: SET_TIMEOUT,+ timeMs: POLL_INTERVAL,+ imageBitmap});}@@ -153,18 +159,24 @@ export default class ScreenshotCaptureSummary {* @param {EventHandler} message - Message received from the Worker.* @returns {void}*/- _handleWorkerAction(message: { data: { id: number; }; }) {- return message.data.id === INTERVAL_TIMEOUT && this._handleScreenshot();+ _handleWorkerAction(message: { data: { id: number; imageBlob?: Blob; }; }) {+ const { id, imageBlob } = message.data;++ this.sendTimeout();+ if (id === TIMEOUT_TICK && imageBlob && this._queue.length < SCREENSHOT_QUEUE_LIMIT) {+ this._doProcessScreenshot(imageBlob);+ }}/*** Method that processes the screenshot.** @private- * @param {ImageData} imageData - The image data of the new screenshot.+ * @param {Blob} imageBlob - The blob for the current screenshot.* @returns {void}*/- _doProcessScreenshot(imageData?: ImageData) {+ _doProcessScreenshot(imageBlob: Blob) {+ this._queue.push(imageBlob);sendAnalytics(createScreensharingCaptureTakenEvent());const conference = getCurrentConference(this._state);@@ -175,41 +187,24 @@ export default class ScreenshotCaptureSummary {const { jwt } = this._state['features/base/jwt'];const meetingFqn = extractFqnFromPath();const remoteParticipants = getRemoteParticipants(this._state);- const participants = [];+ const participants: Array<string | undefined> = [];participants.push(getLocalParticipant(this._state)?.id);remoteParticipants.forEach(p => participants.push(p.id));- this._storedImageData = imageData;- processScreenshot(this._currentCanvas, {+ processScreenshot(imageBlob, {jid,jwt,sessionId,timestamp,meetingFqn,participants- });- }+ }).then(() => {+ const index = this._queue.indexOf(imageBlob);- /**- * Screenshot handler.- *- * @private- * @returns {void}- */- async _handleScreenshot() {- const imageBitmap = await this._imageCapture.grabFrame();-- this._currentCanvasContext?.drawImage(imageBitmap, 0, 0, this._streamWidth, this._streamHeight);- const imageData = this._currentCanvasContext?.getImageData(0, 0, this._streamWidth, this._streamHeight);-- resemble(imageData ?? '')- .compareTo(this._storedImageData ?? '')- .setReturnEarlyThreshold(PERCENTAGE_LOWER_BOUND)- .onComplete(resultData => {- if (resultData.rawMisMatchPercentage > PERCENTAGE_LOWER_BOUND) {- this._doProcessScreenshot(imageData);- }- });+ if (index > -1) {+ this._queue.splice(index, 1);+ }+ });}}diff --git a/react/features/screenshot-capture/constants.ts b/react/features/screenshot-capture/constants.tsindex d087e94de3..dc847cb111 100644--- a/react/features/screenshot-capture/constants.ts+++ b/react/features/screenshot-capture/constants.ts@@ -1,40 +1,44 @@/*** Percent of pixels that signal if two images should be considered different.*/-export const PERCENTAGE_LOWER_BOUND = 5;+export const PERCENTAGE_LOWER_BOUND = 4;/*** Number of milliseconds that represent how often screenshots should be taken.*/-export const POLL_INTERVAL = 4000;+export const POLL_INTERVAL = 2000;/**- * SET_INTERVAL constant is used to set interval and it is set in+ * SET_TIMEOUT constant is used to set interval and it is set in* the id property of the request.data property. TimeMs property must* also be set. Request.data example:** {- * id: SET_INTERVAL,+ * id: SET_TIMEOUT,* timeMs: 33* }.*/-export const SET_INTERVAL = 1;+export const SET_TIMEOUT = 1;/**- * CLEAR_INTERVAL constant is used to clear the interval and it is set in+ * CLEAR_TIMEOUT constant is used to clear the interval and it is set in* the id property of the request.data property.** {- * id: CLEAR_INTERVAL+ * id: CLEAR_TIMEOUT* }.*/-export const CLEAR_INTERVAL = 2;+export const CLEAR_TIMEOUT = 2;/**- * INTERVAL_TIMEOUT constant is used as response and it is set in the id property.+ * TIMEOUT_TICK constant is used as response and it is set in the id property.** {- * id: INTERVAL_TIMEOUT+ * id: TIMEOUT_TICK* }.*/-export const INTERVAL_TIMEOUT = 3;+export const TIMEOUT_TICK = 3;++export const SCREENSHOT_QUEUE_LIMIT = 3;++export const MAX_FILE_SIZE = 1000000;diff --git a/react/features/screenshot-capture/processScreenshot.js b/react/features/screenshot-capture/processScreenshot.jsindex 2b7f2b5863..4756dfc98a 100644--- a/react/features/screenshot-capture/processScreenshot.js+++ b/react/features/screenshot-capture/processScreenshot.js@@ -1,10 +1,10 @@/*** Helper method used to process screenshots captured by the {@code ScreenshotCaptureEffect}.*- * @param {HTMLCanvasElement} canvas - The canvas containing a screenshot to be processed.+ * @param {Blob} imageBlob - The blob of the screenshot that has to be processed.* @param {Object} options - Custom options required for processing.- * @returns {void}+ * @returns {Promise<void>}*/-export function processScreenshot(canvas, options) { // eslint-disable-line no-unused-vars+export async function processScreenshot(imageBlob, options) { // eslint-disable-line no-unused-varsreturn;}diff --git a/react/features/screenshot-capture/worker.ts b/react/features/screenshot-capture/worker.tsindex 97d6b00553..09c1f3ecd7 100644--- a/react/features/screenshot-capture/worker.ts+++ b/react/features/screenshot-capture/worker.ts@@ -1,29 +1,132 @@+import pixelmatch from 'pixelmatch';+import {- CLEAR_INTERVAL,- INTERVAL_TIMEOUT,- SET_INTERVAL+ CLEAR_TIMEOUT,+ MAX_FILE_SIZE,+ PERCENTAGE_LOWER_BOUND,+ SET_TIMEOUT,+ TIMEOUT_TICK} from './constants';-const code = `- var timer;- onmessage = function(request) {- switch (request.data.id) {- case ${SET_INTERVAL}: {- timer = setInterval(() => {- postMessage({ id: ${INTERVAL_TIMEOUT} });- }, request.data.timeMs);- break;- }- case ${CLEAR_INTERVAL}: {- if (timer) {- clearInterval(timer);+let timer: ReturnType<typeof setTimeout>;+const canvas = new OffscreenCanvas(0, 0);+const ctx = canvas.getContext('2d');+let storedImageData: ImageData | undefined;++/**+ * Sends Blob with the screenshot to main thread.+ *+ * @param {ImageData} imageData - The image of the screenshot.+ * @returns {void}+ */+async function sendBlob(imageData: ImageData) {+ let imageBlob = await canvas.convertToBlob({ type: 'image/jpeg' });++ if (imageBlob.size > MAX_FILE_SIZE) {+ const quality = Number((MAX_FILE_SIZE / imageBlob.size).toFixed(2)) * 0.92;++ imageBlob = await canvas.convertToBlob({ type: 'image/jpeg',+ quality });+ }++ storedImageData = imageData;++ postMessage({+ id: TIMEOUT_TICK,+ imageBlob+ });+}++/**+ * Sends empty message to main thread.+ *+ * @returns {void}+ */+function sendEmpty() {+ postMessage({+ id: TIMEOUT_TICK+ });+}++/**+ * Draws the image bitmap on the canvas and checks the difference percent with the previous image+ * if there is no previous image the percentage is not calculated.+ *+ * @param {ImageBitmap} imageBitmap - The image bitmap that is drawn on canvas.+ * @returns {void}+ */+function checkScreenshot(imageBitmap: ImageBitmap) {+ const { height, width } = imageBitmap;++ if (canvas.width !== width) {+ canvas.width = width;+ }++ if (canvas.height !== height) {+ canvas.height = height;+ }++ ctx?.drawImage(imageBitmap, 0, 0, width, height);+ const imageData = ctx?.getImageData(0, 0, width, height);++ imageBitmap.close();++ if (!imageData) {+ sendEmpty();++ return;+ }++ if (!storedImageData || imageData.data.length !== storedImageData.data.length) {+ sendBlob(imageData);++ return;+ }++ let numOfPixels = 0;++ try {+ numOfPixels = pixelmatch(+ imageData.data,+ storedImageData.data,+ null,+ width,+ height);+ } catch {+ sendEmpty();++ return;+ }++ const percent = numOfPixels / imageData.data.length * 100;++ if (percent >= PERCENTAGE_LOWER_BOUND) {+ sendBlob(imageData);+ } else {+ sendEmpty();+ }+}++onmessage = function(request) {+ switch (request.data.id) {+ case SET_TIMEOUT: {+ timer = setTimeout(async () => {+ const imageBitmap = request.data.imageBitmap;++ if (imageBitmap) {+ checkScreenshot(imageBitmap);+ } else {+ sendEmpty();}- break;- }+ }, request.data.timeMs);+ break;+ }+ case CLEAR_TIMEOUT: {+ if (timer) {+ clearTimeout(timer);}- };-`;--// @ts-ignore-export const timerWorkerScript = URL.createObjectURL(new Blob([ code ], { type: 'application/javascript' }));+ break;+ }+ }+};diff --git a/webpack.config.js b/webpack.config.jsindex 07b9715c0f..d096cb855d 100644--- a/webpack.config.js+++ b/webpack.config.js@@ -383,6 +383,17 @@ module.exports = (_env, argv) => {globalObject: 'AudioWorkletGlobalScope'}+ }),++ Object.assign({}, config, {+ entry: {+ 'screenshot-capture-worker': './react/features/screenshot-capture/worker.ts'+ },+ plugins: [+ ...config.plugins,+ ...getBundleAnalyzerPlugin(analyzeBundle, 'screenshot-capture-worker')+ ],+ performance: getPerformanceHints(perfHintOptions, 4 * 1024)})];};