MAUI WebView Apps do not allow iframe videos to run full screen
See original GitHub issueDescription
In a MAUI Blazor app, when you try to make an iframe video to run full screen in android devices, nothing happens.
Steps to Reproduce
- Create a new MAUI Blazor app
- In the Index page, add an iframe to a video. Example below
<iframe width="684" height="385" src="https://www.youtube.com/embed/sGYIDKx6cY0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>
- Deploy the app to an android device.
- Try to make the video to play full screen
Same thing happens with Azure Media Player
Version with bug
6.0 (current)
Last version that worked well
Unknown/Other
Affected platforms
Android
Affected platform versions
Android 12
Did you find any workaround?
No, I haven’t found a workaround
Relevant log output
Log when using Azure Media Player [chromium] [INFO:CONSOLE(37)] “Uncaught (in promise) TypeError: fullscreen error”, source: https://amp.azure.net/libs/amp/latest/azuremediaplayer.min.js (37) [CCodecBufferChannel] [c2.qti.avc.decoder#386] DEBUG: elapsed: n=16 [in=0 pipeline=0 out=12] [ViewRootImpl@c269f0c[MainActivity]] ViewPostIme pointer 0 [ViewRootImpl@c269f0c[MainActivity]] ViewPostIme pointer 1 [ViewRootImpl@c269f0c[MainActivity]] ViewPostIme pointer 0 [ViewRootImpl@c269f0c[MainActivity]] ViewPostIme pointer 1 [BufferPoolAccessor2.0] bufferpool2 0xb4000076260d9838 : 5(15667200 size) total buffers - 4(12533760 size) used buffers - 341/347 (recycle/alloc) - 9/345 (fetch/transfer) [ViewRootImpl@c269f0c[MainActivity]] ViewPostIme pointer 0 [CCodecBufferChannel] [c2.qti.avc.decoder#386] DEBUG: elapsed: n=16 [in=0 pipeline=0 out=12] [ViewRootImpl@c269f0c[MainActivity]] ViewPostIme pointer 1 [chromium] [INFO:CONSOLE(37)] “Uncaught (in promise) TypeError: Failed to execute ‘exitFullscreen’ on ‘Document’: Document not active”, source: https://amp.azure.net/libs/amp/latest/azuremediaplayer.min.js (37) Thread finished: <Thread Pool> #16 Thread finished: <Thread Pool> #18 Thread finished: <Thread Pool> #15
Issue Analytics
- State:
- Created a year ago
- Comments:10 (5 by maintainers)
Top GitHub Comments
Hello friends, I found a solution and I wrote an article about how to implement it, hopefully you find it helpful 😃
In this post, I will show you how to enable the feature allowing users to watch videos in full-screen mode on .NET MAUI WebViews for Android, using a simple custom handler and some native code. https://dev.to/vhugogarcia/net-maui-webviews-how-to-play-videos-in-full-screen-1j03
Thank you all!
Yes, same issue with a normal MAUI app with a WebView.
Seems related/duplicate of this: https://github.com/dotnet/maui/issues/7720