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 2020/03/28 14:06:23 UTC

[openmeetings] branch master updated: [OPENMEETINGS-2167] arrange windows is fixed

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 7f8d25a  [OPENMEETINGS-2167] arrange windows is fixed
7f8d25a is described below

commit 7f8d25a22ef248a8f129b498ebd56dab60caa689
Author: Maxim Solodovnik <so...@gmail.com>
AuthorDate: Sat Mar 28 21:06:09 2020 +0700

    [OPENMEETINGS-2167] arrange windows is fixed
---
 .../apache/openmeetings/web/room/raw-video-manager.js   | 17 +++++++----------
 .../org/apache/openmeetings/web/room/raw-video-util.js  | 13 +++++++------
 .../java/org/apache/openmeetings/web/room/raw-video.js  |  2 +-
 3 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video-manager.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video-manager.js
index 3f02867..4ecbb3e 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video-manager.js
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video-manager.js
@@ -58,7 +58,7 @@ var VideoManager = (function() {
 	function _onKMessage(m) {
 		switch (m.id) {
 			case 'clientLeave':
-				$(VID_SEL + ' div[data-client-uid="' + m.uid + '"]').each(function() {
+				$(VID_SEL + '[data-client-uid="' + m.uid + '"]').each(function() {
 					_closeV($(this));
 				});
 				if (share.data('cuid') === m.uid) {
@@ -152,11 +152,9 @@ var VideoManager = (function() {
 			}
 		});
 		if (c.uid === Room.getOptions().uid) {
-			const windows = $(VID_SEL + ' .ui-dialog-content');
-			for (let i = 0; i < windows.length; ++i) {
-				const w = $(windows[i]);
-				w.data().setRights(c.rights);
-			}
+			$(VID_SEL).each(function() {
+				$(this).data().setRights(c.rights);
+			});
 		}
 		$('[data-client-uid="' + c.cuid + '"]').each(function() {
 			const sd = $(this).data().stream();
@@ -270,11 +268,10 @@ var VideoManager = (function() {
 		}
 	}
 	function _muteOthers(uid) {
-		const windows = $(VID_SEL + ' .ui-dialog-content');
-		for (let i = 0; i < windows.length; ++i) {
-			const w = $(windows[i]);
+		$(VID_SEL).each(function() {
+			const w= $(this);
 			w.data().mute('room' + uid !== w.data('client-uid'));
-		}
+		});
 	}
 	function _toggleActivity(activity) {
 		self.sendMessage({
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video-util.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video-util.js
index 6eaadbe..293bd8a 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video-util.js
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video-util.js
@@ -1,7 +1,8 @@
 /* Licensed under the Apache License, Version 2.0 (the "License") http://www.apache.org/licenses/LICENSE-2.0 */
 const WB_AREA_SEL = '.room-block .wb-block';
-const WBA_WB_SEL = '.room-block .wb-block .ui-tabs-panel.ui-corner-bottom.ui-widget-content:visible';
-const VID_SEL = '.video-container';
+const WBA_WB_SEL = '.room-block .wb-block .wb-tab-content';
+const VIDWIN_SEL = '.video.user-video';
+const VID_SEL = '.video-container[id!=user-video]';
 const CAM_ACTIVITY = 'VIDEO';
 const MIC_ACTIVITY = 'AUDIO';
 const SCREEN_ACTIVITY = 'SCREEN';
@@ -44,7 +45,7 @@ var VideoUtil = (function() {
 	}
 	function _container() {
 		const a = $(WB_AREA_SEL);
-		const c = a.find('.wb-area .tabs .ui-tabs-panel');
+		const c = a.find('.wb-area .tabs .wb-tab-content');
 		return c.length > 0 ? $(WBA_WB_SEL) : a;
 	}
 	function _getPos(list, w, h) {
@@ -76,7 +77,7 @@ var VideoUtil = (function() {
 			};
 		let minY = area.bottom, posFound;
 		do {
-			posFound = true
+			posFound = true;
 			for (let i = 0; i < list.length; ++i) {
 				const rect = list[i];
 				minY = Math.min(minY, rect.bottom);
@@ -100,7 +101,7 @@ var VideoUtil = (function() {
 		return {left: rectNew.left, top: rectNew.top};
 	}
 	function _arrange() {
-		const list = [], elems = $(VID_SEL);
+		const list = [], elems = $(VIDWIN_SEL);
 		for (let i = 0; i < elems.length; ++i) {
 			const v = $(elems[i]);
 			v.css(_getPos(list, v.width(), v.height()));
@@ -108,7 +109,7 @@ var VideoUtil = (function() {
 		}
 	}
 	function _arrangeResize() {
-		const list = [], elems = $(VID_SEL);
+		const list = [], elems = $(VIDWIN_SEL);
 		for (let i = 0; i < elems.length; ++i) {
 			const v = $(elems[i]);
 			v.css(_getPos(list, v.width(), v.height()));
diff --git a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video.js b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video.js
index b9ad0e1..f0e3775 100644
--- a/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video.js
+++ b/openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video.js
@@ -329,7 +329,7 @@ var Video = (function() {
 		_refresh(msg);
 
 		if (!isSharing && !isRecording) {
-			VideoUtil.setPos(v, VideoUtil.getPos(VideoUtil.getRects(VID_SEL), sd.width, sd.height + 25));
+			VideoUtil.setPos(v, VideoUtil.getPos(VideoUtil.getRects(VIDWIN_SEL), sd.width, sd.height + 25));
 		}
 		return v;
 	}