From 0b8711efaf654e86c9cfff8815d6b7f4a8eb9067 Mon Sep 17 00:00:00 2001 From: Rares Golea Date: Mon, 15 Jul 2019 18:43:39 +0200 Subject: [PATCH 1/3] Allow requestFullscreen on videos This allows capacitor to handle fullscreen --- .../main/java/com/getcapacitor/BridgeWebChromeClient.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/android/capacitor/src/main/java/com/getcapacitor/BridgeWebChromeClient.java b/android/capacitor/src/main/java/com/getcapacitor/BridgeWebChromeClient.java index 2d56ad4af..b444abdab 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/BridgeWebChromeClient.java +++ b/android/capacitor/src/main/java/com/getcapacitor/BridgeWebChromeClient.java @@ -41,6 +41,12 @@ public class BridgeWebChromeClient extends WebChromeClient { public BridgeWebChromeClient(Bridge bridge) { this.bridge = bridge; } + + @Override + public void onShowCustomView(View view, CustomViewCallback callback) { + callback.onCustomViewHidden(); + super.onShowCustomView(view, callback); + } @Override public void onPermissionRequest(final PermissionRequest request) { From 960747426f8092a92c825f2e16a403847824d28b Mon Sep 17 00:00:00 2001 From: Rares Golea Date: Mon, 15 Jul 2019 18:48:02 +0200 Subject: [PATCH 2/3] Bug fix Forgot import --- .../src/main/java/com/getcapacitor/BridgeWebChromeClient.java | 1 + 1 file changed, 1 insertion(+) diff --git a/android/capacitor/src/main/java/com/getcapacitor/BridgeWebChromeClient.java b/android/capacitor/src/main/java/com/getcapacitor/BridgeWebChromeClient.java index b444abdab..d8f33b85a 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/BridgeWebChromeClient.java +++ b/android/capacitor/src/main/java/com/getcapacitor/BridgeWebChromeClient.java @@ -16,6 +16,7 @@ import android.webkit.ValueCallback; import android.webkit.WebChromeClient; import android.webkit.WebView; +import android.view.View; import com.getcapacitor.plugin.camera.CameraUtils; From cd316181372c3482b167885448b95f55dfff59cf Mon Sep 17 00:00:00 2001 From: Rares Golea Date: Mon, 15 Jul 2019 23:32:37 +0200 Subject: [PATCH 3/3] Handling OnHideCustomView --- .../main/java/com/getcapacitor/BridgeWebChromeClient.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/android/capacitor/src/main/java/com/getcapacitor/BridgeWebChromeClient.java b/android/capacitor/src/main/java/com/getcapacitor/BridgeWebChromeClient.java index d8f33b85a..029234564 100644 --- a/android/capacitor/src/main/java/com/getcapacitor/BridgeWebChromeClient.java +++ b/android/capacitor/src/main/java/com/getcapacitor/BridgeWebChromeClient.java @@ -48,6 +48,11 @@ public void onShowCustomView(View view, CustomViewCallback callback) { callback.onCustomViewHidden(); super.onShowCustomView(view, callback); } + + @Override + public void onHideCustomView() { + super.onHideCustomView(); + } @Override public void onPermissionRequest(final PermissionRequest request) {