Reputation: 1062
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!
Upvotes: 8
Views: 4235
Reputation: 71
My problem solved when I updated my android chrome application to v74.0.3729.112.
related announcement: https://i.sstatic.net/ASsiW.png
Upvotes: 2
Reputation: 9081
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
Upvotes: 3