question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MAUI WebView Apps do not allow iframe videos to run full screen

See original GitHub issue

Description

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

  1. Create a new MAUI Blazor app
  2. 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>
  3. Deploy the app to an android device.
  4. 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:open
  • Created a year ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
vhugogarciacommented, May 8, 2023

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!

1reaction
efonsecabcommented, Jun 16, 2022

@efonsecab to help us isolate this issue, can you please confirm if the issue also reproduces in the base MAUI WebView (without Blazor)?

Yes, same issue with a normal MAUI app with a WebView.

Seems related/duplicate of this: https://github.com/dotnet/maui/issues/7720

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - Webview Video fullscreen
I am loading a YouTube video in my app using web-view. But the full screen option is not working. How can i achieve...
Read more >
WebView - .NET MAUI
This article explains how to use the .NET MAUI WebView to display remote web pages, local HTML files, and HTML strings.
Read more >
xamarin.android webview fullscreen video - Microsoft Q&A
I've just started making an app which mostly works as webview but a strange thing is that android's webview can't play videos fullscreen...
Read more >
Is inline Video / Webview possible?
It works on iOS but I experienced the same thing with videos defaulting and only playing in fullscreen. So for web we need...
Read more >
NET MAUI WebViews: How to Play Videos in Full Screen
This feature allows users to watch videos in full screen mode in Android, without leaving the WebView or opening a new activity. In...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found