solomax commented on a change in pull request #95:
URL: https://github.com/apache/openmeetings/pull/95#discussion_r428061349
##########
File path:
openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video.js
##########
@@ -391,7 +391,7 @@ var Video = (function() {
_resizeDlgArea(hasVideo ? size.width : 120
, hasVideo ? size.height : 90);
if (hasVideo && !isSharing && !isRecording) {
- VideoUtil.setPos(v,
VideoUtil.getPos(VideoUtil.getRects(VIDWIN_SEL), sd.width, sd.height + 25));
+ VideoUtil.arrange();
Review comment:
Imagine user moved video windows to preferred position
then someone have restarted his/her video device or exit the room
and all user actions will be reset ....
I believe these 3 calls to `arrange` shoul be removed
##########
File path:
openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video-util.js
##########
@@ -147,31 +148,65 @@ var VideoUtil = (function() {
const processor = _processor || __processTopToBottom;
return processor(area, rectNew, list);
}
- function _arrange() {
- const list = [];
- $(VIDWIN_SEL).each(function() {
- const v = $(this);
- v.css(_getPos(list, v.width(), v.height()));
- list.push(_getRect(v));
- });
+ function _arrange_set(v, list) {
+ var w, h, f, r = false;
+
+ switch (self.arrangeMode) {
+ case 1:
+ w = 240;
+ h = 180;
+ break;
+ case 2:
+ w = 120;
+ h = 90;
+ f = __processEqualsBottomToTop;
+ break;
+
+ default:
+ const v2 = v.find('.video').get(0);
+ w = v2 && parseInt(v2.style.width, 10);
Review comment:
Am I right `, 10` cab omitted here?
##########
File path:
openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video-util.js
##########
@@ -147,31 +148,65 @@ var VideoUtil = (function() {
const processor = _processor || __processTopToBottom;
return processor(area, rectNew, list);
}
- function _arrange() {
- const list = [];
- $(VIDWIN_SEL).each(function() {
- const v = $(this);
- v.css(_getPos(list, v.width(), v.height()));
- list.push(_getRect(v));
- });
+ function _arrange_set(v, list) {
+ var w, h, f, r = false;
+
+ switch (self.arrangeMode) {
+ case 1:
Review comment:
I would prefer constants with meaningful names here :))
##########
File path:
openmeetings-web/src/main/java/org/apache/openmeetings/web/room/raw-video-util.js
##########
@@ -147,31 +148,65 @@ var VideoUtil = (function() {
const processor = _processor || __processTopToBottom;
return processor(area, rectNew, list);
}
- function _arrange() {
- const list = [];
- $(VIDWIN_SEL).each(function() {
- const v = $(this);
- v.css(_getPos(list, v.width(), v.height()));
- list.push(_getRect(v));
- });
+ function _arrange_set(v, list) {
+ var w, h, f, r = false;
+
+ switch (self.arrangeMode) {
+ case 1:
+ w = 240;
+ h = 180;
+ break;
+ case 2:
+ w = 120;
+ h = 90;
+ f = __processEqualsBottomToTop;
+ break;
+
+ default:
+ const v2 = v.find('.video').get(0);
+ w = v2 && parseInt(v2.style.width, 10);
+ h = v2 && parseInt(v2.style.height, 10);
+ r = true;
+ break;
+ }
+
+ v.find(VID_DLG)
+ .dialog('option', 'width', w)
Review comment:
There is the method in `raw-video` doing all this
I guess it can be reused
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]