Replies: 2 comments 1 reply
-
@seanaye this fixes the problem with a transparent 1x1 transparent bitmap
|
Beta Was this translation helpful? Give feedback.
0 replies
-
With Capacitor 3 the following did the trick (based on @simon-lanf answer, thanks!): public class MainActivity extends BridgeActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
....
}
@Override
public void onStart() {
super.onStart();
// disables the ugly default video tag poster image
this.getBridge().getWebView().setWebChromeClient(new BridgeWebChromeClient(bridge) {
@Override
public Bitmap getDefaultVideoPoster() {
return Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888);
}
});
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
video elements on android show an ugly grey play button before the video poster loads. I have searched everywhere for a solution to hide this button but I can't find one that works.
I have tried a shadow dom css solution suggested on stackoverflow. I can confirm this correctly applies to the element by using chrome remote debug and inspecting the shadow dom element. It shows display:none; but the button is still visible. Please see my gist (screenshot is wide, scroll to the right to see full image)
I have also read here you can override the standard capacitor webview to get rid of the button. I cant find any documentation on how to do this. I put the following in my MainActivity.java (not an android developer so not really sure what im doing here)
Please help me fix this I feel like it should be a simple fix but i have tried for days to no avail.
Beta Was this translation helpful? Give feedback.
All reactions