You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by so...@apache.org on 2018/03/12 13:23:51 UTC
[openmeetings] branch 4.0.x updated: [OPENMEETINGS-1849] AV start
works if all WB tabs are closed
This is an automated email from the ASF dual-hosted git repository.
solomax pushed a commit to branch 4.0.x
in repository https://gitbox.apache.org/repos/asf/openmeetings.git
The following commit(s) were added to refs/heads/4.0.x by this push:
new 03e5fdb [OPENMEETINGS-1849] AV start works if all WB tabs are closed
03e5fdb is described below
commit 03e5fdb773b15b0ba08f6a3602ff51147f8afd78
Author: Maxim Solodovnik <so...@gmail.com>
AuthorDate: Mon Mar 12 20:23:42 2018 +0700
[OPENMEETINGS-1849] AV start works if all WB tabs are closed
---
.../main/java/org/apache/openmeetings/web/room/video-manager.js | 5 +----
.../src/main/java/org/apache/openmeetings/web/room/video-util.js | 9 +++++++--
.../src/main/java/org/apache/openmeetings/web/room/video.js | 2 +-
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/video-manager.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/video-manager.js
index 66c7e61..e3c451a 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/video-manager.js
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/video-manager.js
@@ -4,9 +4,6 @@ var VideoManager = (function() {
let share, inited = false;
function _init() {
- if ($(WB_AREA_SEL + ' .wb-area .tabs').length > 0) {
- WBA_SEL = WBA_WB_SEL;
- }
VideoSettings.init(Room.getOptions());
share = $('.room.box').find('.icon.shared.ui-button');
inited = true;
@@ -68,7 +65,7 @@ var VideoManager = (function() {
share.tooltip().off('click').click(function() {
const v = $('#' + VideoUtil.getVid(c.uid))
if (v.length !== 1) {
- Video().init(c, $(WBA_SEL).offset());
+ Video().init(c, VideoUtil.container().offset());
} else {
v.dialog('open');
}
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/video-util.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/video-util.js
index 5f831ff..950efbb 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/video-util.js
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/video-util.js
@@ -1,7 +1,6 @@
/* Licensed under the Apache License, Version 2.0 (the "License") http://www.apache.org/licenses/LICENSE-2.0 */
const WB_AREA_SEL = '.room.wb.area';
const WBA_WB_SEL = '.room.wb.area .ui-tabs-panel.ui-corner-bottom.ui-widget-content:visible';
-var WBA_SEL = WB_AREA_SEL;
const VID_SEL = '.video.user-video';
var VideoUtil = (function() {
const self = {};
@@ -38,11 +37,16 @@ var VideoUtil = (function() {
, right: winoff.left + win.width()
, bottom: winoff.top + win.height()};
}
+ function _container() {
+ const a = $(WB_AREA_SEL);
+ const c = a.find('.wb-area .tabs .ui-tabs-panel');
+ return c.length > 0 ? $(WBA_WB_SEL) : a;
+ }
function _getPos(list, w, h) {
if (Room.getOptions().interview) {
return {left: 0, top: 0};
}
- const wba = $(WBA_SEL), woffset = wba.offset()
+ const wba = _container(), woffset = wba.offset()
, offsetX = 20, offsetY = 10
, area = {left: woffset.left, top: woffset.top, right: woffset.left + wba.width(), bottom: woffset.top + wba.height()};
const rectNew = {
@@ -106,6 +110,7 @@ var VideoUtil = (function() {
self.hasVideo = _hasVideo;
self.getRects = _getRects;
self.getPos = _getPos;
+ self.container = _container;
self.arrange = _arrange;
return self;
})();
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/video.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/video.js
index 4322f35..47f8011 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/video.js
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/video.js
@@ -20,7 +20,7 @@ var Video = (function() {
return;
}
if (on) {
- v.dialog("option", "position", {my: "center", at: "center", of: WBA_SEL});
+ v.dialog("option", "position", {my: "center", at: "center", of: VideoUtil.container()});
} else {
const h = _resizeDlg(size.width, size.height);
v.dialog("widget").css(VideoUtil.getPos(VideoUtil.getRects(VID_SEL, VideoUtil.getVid(c.uid)), c.width, h));
--
To stop receiving notification emails like this one, please contact
solomax@apache.org.