diff --git a/android/src/main/java/ee/forgr/ivsplayer/CapacitorIvsPlayerPlugin.java b/android/src/main/java/ee/forgr/ivsplayer/CapacitorIvsPlayerPlugin.java index 0557514..28f0aef 100644 --- a/android/src/main/java/ee/forgr/ivsplayer/CapacitorIvsPlayerPlugin.java +++ b/android/src/main/java/ee/forgr/ivsplayer/CapacitorIvsPlayerPlugin.java @@ -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 @@ -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()