Skip to content

Commit 5ab33f2

Browse files
committed
sometimes body element has width 0 or height 0. Implemented a workaround.
1 parent b61d138 commit 5ab33f2

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

static-content/js/initlast.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,5 @@ function prepareElements() {
3535

3636
prepareElements();
3737

38-
document.body.style["font-family"] = "Tiresias";
38+
document.body.style["font-family"] = "Tiresias";
39+
document.body.style["overflow"] = "hidden";

static-content/js/videoobserver.js

+6
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,12 @@ window.promoteVideoSize = (node, considerLayer) => {
1919
console.log("In PromoteVideoSize: Fullscreen: " + ((position.x === bodyPos.x) && (position.y === bodyPos.y) && (position.height === bodyPos.height) && (position.width === bodyPos.width)));
2020
*/
2121

22+
// if width or height of body is 0, then set values to the maximum size
23+
if (bodyPos.width == 0 || bodyPos.height == 0) {
24+
bodyPos.width = 1280;
25+
bodyPos.height = 720;
26+
}
27+
2228
if ((position.width == 300) && (position.height == 150)) {
2329
// sometimes the wrong size is requested. Ignore this to prevent flickering
2430
// console.log("Size 300x150 requested");

0 commit comments

Comments
 (0)