If you are developing a .NET MAUI app that uses WebViews to display web content, you might want to enable the full-screen video feature for your us...
For further actions, you may consider blocking this person and/or reporting abuse
Firstly, thanks for the excellent solution!
Have you tried this on .Net 8 Preview 5? Because what I'm seeing is, after leaving fullscreen mode:
I'm fairly certain this is a bug in MAUI, but since it's not an officially supported feature I'm afraid they won't address it.
Hello, @vhugogarcia , @stefanpirkl ,
So, i found workaround for you, I don't dig into it more as its work for me.
Try nuget.org/packages/FullScreenStatu... this nuget with this handler and when you appear on webview page init fullscreen mode and restore when leaving, and magic its fill entire screen.
Hello @stefanpirkl ,
Thanks for your comment! I haven’t tried since .NET MAUI 8 is still on preview. From what I saw on your comment, you are using preview 5, however, the preview 6 was released 2 weeks ago, I recommend you to update it and try it again.
Also our friend Javier from the .NET MAUI team at Microsoft has been working on the implementation of this feature natively for .NET MAUI 8, you can find the Pull-Request updates here: github.com/dotnet/maui/pull/15472
So, this feature will be officially supported in .NET MAUI 8 🙂😎
Regards,
Victor
Hi Victor,
thanks so much for replying!
Updating to preview 6 gave me a lot of unrelated compile errors and to be honest, I'm not willing to deal with those at the moment because preview 5 is working very well otherwise.
In this particular instance, we can live with setting the navigation bar invisible and having no "real" fullscreen. Knowing it will be supported in .Net 8 is awesome news!
Kind regards,
Stefan
You can register it by adding the following line:
WebViewHandler.EnableVideoFeatures();
beforereturn builder.Build();
inside thepublic static MauiApp CreateMauiApp()
method.Thank you :)
Thanks for the post. A question for you, is there any way to fit the website in one screen, webview shows only partial view of the page, and I can not automatically change the zoom level or any other settings programmatically to show entire page.
Hello @mkgungor ,
Yes, you can certainly set the high and width of the webview control to the size of the screen. If the website design you are trying to load on the webview supports multiple resolutions in a responsive way, then you should be covered. Feel free to see my post: dev.to/vhugogarcia/responsive-flyo... where I explain how to make a control to adapt to the screen resolution. You can use most of the logic and apply it to a webview control.
I hope I could help :)
Regards,
Victor
Working fine this, but I can't back to page or close this Page Container Web
Hello @phantomkna ,
Glad it worked OK. It is strange you cannot get back. Set a breakpoint on the method
OnHideCustomView()
and confirm it is being executed.Hi bro, everything ok, the problem is because another control when as called, thx you soo much!!
In maui webview even when setting Horizontal options FillandExpand some part of video is getting cut which include full screen option.
Hello,
I’m developing an app using MAUI .NET 8.0 for Android TV and Android phones. I need to enable full-screen mode for a website within a WebView, but my current code doesn’t seem to be working.