Skip to content

Commit 4a67a67

Browse files
fix deskshare preview when the area is wider
1 parent f58fa12 commit 4a67a67

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

bigbluebutton-client/src/org/bigbluebutton/modules/deskshare/view/components/DesktopPublishWindow.mxml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,12 +238,19 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
238238
var vidH:Number = captureHeight;
239239
240240
// Don't scale if capture dimension is smaller than window.
241-
if ((captureWidth > this.width - VID_WIDTH_PAD) && (captureHeight > this.height - VID_HEIGHT_PAD)) {
241+
if((captureWidth > this.width - VID_WIDTH_PAD) && (captureHeight < this.height - VID_HEIGHT_PAD)){
242+
vidW = this.width - VID_WIDTH_PAD;
243+
vidH = (captureHeight / captureWidth) * vidW;
244+
}
245+
else if( ((captureWidth < this.width - VID_WIDTH_PAD) && (captureHeight > this.height - VID_HEIGHT_PAD))
246+
|| ((captureWidth > this.width - VID_WIDTH_PAD) && (captureHeight > this.height - VID_HEIGHT_PAD)) ){
242247
vidH = this.height - VID_HEIGHT_PAD;
243248
vidW = (captureWidth / captureHeight) * vidH;
244-
vidW = vidW + VID_WIDTH_PAD;
245-
}
246-
249+
}
250+
else{
251+
vidW = captureWidth;
252+
vidH = captureHeight;
253+
}
247254
248255
LogUtil.debug("deskshare preview[" + captureWidth + "," + captureHeight + "][" + vidW + "," + vidH + "]");
249256
video = new Video(vidW, vidH);

0 commit comments

Comments
 (0)