mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
bug 1112338 - increase max output stream to 720p r=rbarker, mfinkle
This commit is contained in:
parent
afc20ecc87
commit
46cfae8bb2
@ -285,23 +285,24 @@ function RemoteMirror(url, win, viewport, mirrorStartedCallback, contentWindow)
|
||||
this._iceCandidates = [];
|
||||
this.mirrorStarted = mirrorStartedCallback;
|
||||
|
||||
// This code insures the generated tab mirror is not wider than 800 nor taller than 600
|
||||
// This code insures the generated tab mirror is not wider than 1280 nor taller than 720
|
||||
// Better dimensions should be chosen after the Roku Channel is working.
|
||||
let windowId = contentWindow.QueryInterface(Ci.nsIInterfaceRequestor).getInterface(Ci.nsIDOMWindowUtils).outerWindowID;
|
||||
let cWidth = Math.max(viewport.cssWidth, viewport.width);
|
||||
let cHeight = Math.max(viewport.cssHeight, viewport.height);
|
||||
|
||||
const MAX_WIDTH = 800;
|
||||
const MAX_HEIGHT = 600;
|
||||
const MAX_WIDTH = 1280;
|
||||
const MAX_HEIGHT = 720;
|
||||
|
||||
let tWidth = 0;
|
||||
let tHeight = 0;
|
||||
|
||||
// division and multiplication by 4 to ensure dimensions are multiples of 4
|
||||
if ((cWidth / MAX_WIDTH) > (cHeight / MAX_HEIGHT)) {
|
||||
tHeight = Math.ceil((MAX_WIDTH / cWidth) * cHeight);
|
||||
tHeight = Math.ceil((MAX_WIDTH / (4* cWidth)) * cHeight) * 4;
|
||||
tWidth = MAX_WIDTH;
|
||||
} else {
|
||||
tWidth = Math.ceil((MAX_HEIGHT / cHeight) * cWidth);
|
||||
tWidth = Math.ceil((MAX_HEIGHT / (4 * cHeight)) * cWidth) * 4;
|
||||
tHeight = MAX_HEIGHT;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user