This is an automated email from the ASF dual-hosted git repository.
solomax pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openmeetings.git
The following commit(s) were added to refs/heads/master by this push:
new 8716d6c [OPENMEETINGS-2700] screensharing is disabled if
getDisplayMedia is unavailable
8716d6c is described below
commit 8716d6ccedfedea3dea160a043053351fbbea71e
Author: Maxim Solodovnik <[email protected]>
AuthorDate: Thu Nov 18 15:59:28 2021 +0700
[OPENMEETINGS-2700] screensharing is disabled if getDisplayMedia is
unavailable
---
openmeetings-web/src/main/front/room/src/video.js | 5 -----
.../src/main/front/settings/src/video-util.js | 16 +++++++++-------
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/openmeetings-web/src/main/front/room/src/video.js
b/openmeetings-web/src/main/front/room/src/video.js
index 709e9f8..676c9d5 100644
--- a/openmeetings-web/src/main/front/room/src/video.js
+++ b/openmeetings-web/src/main/front/room/src/video.js
@@ -42,11 +42,6 @@ module.exports = class Video {
video: true
};
promise = navigator.getDisplayMedia(cnts);
- } else if (b.name === 'Firefox') {
- //
https://mozilla.github.io/webrtc-landing/gum_test.html
- cnts = Sharer.baseConstraints(sd);
- cnts.video.mediaSource = sd.shareType;
- promise =
navigator.mediaDevices.getUserMedia(cnts);
} else if (VideoUtil.sharingSupported()) {
cnts = {
video: true
diff --git a/openmeetings-web/src/main/front/settings/src/video-util.js
b/openmeetings-web/src/main/front/settings/src/video-util.js
index 6fa3343..2d9c28c 100644
--- a/openmeetings-web/src/main/front/settings/src/video-util.js
+++ b/openmeetings-web/src/main/front/settings/src/video-util.js
@@ -269,13 +269,15 @@ function _disconnect(node) {
function _sharingSupported() {
const b = OmUtil.browser;
return (b.name === 'Edge' && b.major > 16)
- || b.name === 'Firefox'
- || b.name === 'Opera'
- || b.name === 'Yandex'
- || (OmUtil.isSafari() &&
typeof(navigator.mediaDevices.getDisplayMedia) === 'function')
- || OmUtil.isChrome()
- || OmUtil.isEdgeChromium()
- || (b.name === 'Mozilla' && b.major > 4);
+ || (typeof(navigator.mediaDevices.getDisplayMedia) ===
'function'
+ && (b.name === 'Firefox'
+ || b.name === 'Opera'
+ || b.name === 'Yandex'
+ || OmUtil.isSafari()
+ || OmUtil.isChrome()
+ || OmUtil.isEdgeChromium()
+ || (b.name === 'Mozilla' && b.major > 4)
+ ));
}
function _highlight(el, clazz, count) {
if (!el || el.length < 1 || el.hasClass('disabled') || count < 0) {