diff --git a/bigbluebutton-client/src/org/bigbluebutton/modules/deskshare/view/components/DesktopPublishWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/modules/deskshare/view/components/DesktopPublishWindow.mxml index 0d61e60aeb..e59845cfbc 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/modules/deskshare/view/components/DesktopPublishWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/modules/deskshare/view/components/DesktopPublishWindow.mxml @@ -238,12 +238,19 @@ with BigBlueButton; if not, see . var vidH:Number = captureHeight; // Don't scale if capture dimension is smaller than window. - if ((captureWidth > this.width - VID_WIDTH_PAD) && (captureHeight > this.height - VID_HEIGHT_PAD)) { + if((captureWidth > this.width - VID_WIDTH_PAD) && (captureHeight < this.height - VID_HEIGHT_PAD)){ + vidW = this.width - VID_WIDTH_PAD; + vidH = (captureHeight / captureWidth) * vidW; + } + else if( ((captureWidth < this.width - VID_WIDTH_PAD) && (captureHeight > this.height - VID_HEIGHT_PAD)) + || ((captureWidth > this.width - VID_WIDTH_PAD) && (captureHeight > this.height - VID_HEIGHT_PAD)) ){ vidH = this.height - VID_HEIGHT_PAD; vidW = (captureWidth / captureHeight) * vidH; - vidW = vidW + VID_WIDTH_PAD; - } - + } + else{ + vidW = captureWidth; + vidH = captureHeight; + } LogUtil.debug("deskshare preview[" + captureWidth + "," + captureHeight + "][" + vidW + "," + vidH + "]"); video = new Video(vidW, vidH);