I'm trying to load a video URL in a WebView in android using the example in this project: https://github.com/hanksudo/android-webview-youtube-fullscreen
Thing is the onShowCustomView
method is never called. Whenever I click on the full screen
button of the video I get this error:
I/chromium: [INFO:CONSOLE(0)] "Failed to execute 'requestFullscreen' on 'Element': API can only be initiated by a user gesture.", source: https://m.youtube.com/watch?v=dRekGX6dQRY (0)
Anyone knows how to fix it? Why is the browser interpreting it as a JS request and not a user gesture to make the video fullscreen? Are there any special flags I can set to enable full screen?
Thanks!
It is this high-priority bug in Google Chrome when used as WebView, fixed in Google Chrome 74.
https://bugs.chromium.org/p/chromium/issues/detail?id=945287
My problem solved when I updated my android chrome application to v74.0.3729.112.
related announcement: https://i.stack.imgur.com/ASsiW.png
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With