Skip to content

Commit

Permalink
fix: android in-app pip not having correct size and position
Browse files Browse the repository at this point in the history
  • Loading branch information
victorleduc committed Sep 7, 2023
1 parent 8864116 commit 0136a4d
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ public void makeFloating() {
int x = size.x - halfScreenSizeX - 30;
int y = size.y - height - 30;
// get half of width and calculate height
_setFrame(x, y, halfScreenSizeX, height);
_setFrame(x, y, halfScreenSizeX, height, true);
}

// function to send webview to front
Expand Down Expand Up @@ -1111,7 +1111,17 @@ public void setPip(PluginCall call) {
}

private void _setFrame(int x, int y, int width, int height) {
if (isPip) {
this._setFrame(x, y, width, height, false);
}

private void _setFrame(
int x,
int y,
int width,
int height,
boolean forceSetFrame
) {
if (isPip && !forceSetFrame) {
return;
}
getActivity()
Expand Down

0 comments on commit 0136a4d

Please sign in to comment.