maui
maui copied to clipboard
[Android] Allow full screen videos from WebView
Description of Change
Allow full screen videos from WebView.
To validate the changes can use the new added sample to the WebView galleries in the .NET MAUI Gallery App.
Issues Fixed
Fixes #8030 Fixes #7720
Hello @jsuarezruiz,
Thanks for adding this new feature to .NET MAUI Webviews on Android. I would like to share some ideas here.
On this method, we need to return to the original orientation of the device. However, there are some points we need to cover and validate:
- Phone in portrait-mode, enters full screen it goes in landscape-mode, then when returning from full screen the device orientation must change to portrait-mode again.
- it may happen that the app is compatible with Tablet/Phone in landscape-only. So, if the video goes full screen when returned it must not change to portrait-mode because the app only supports landscape-mode.
How this can be solved? well, if it is possible to know the orientation supported by the app then we can just add a validation for it, otherwise, we need to think how to validate that for the second scenario.
Also, we need to validate which is the status of the current SystemBars settings are on the app, because for example, I may have an application that only shows the StatusBar and not the navigation bar, so by doing this, we are showing status and navigation bar which may not be the expected result.
context.Window.InsetsController?.Show(WindowInsets.Type.SystemBars());
So, we may need to validate if the user has StatusBarVisible and NavigationBar visible before enter full screen save it on a variable or somewhere, and then when returning we show only what was visible. :)
What do you think @jsuarezruiz ?
Also, we need to validate which is the status of the current SystemBars settings are on the app, because for example, I may have an application that only shows the StatusBar and not the navigation bar, so by doing this, we are showing status and navigation bar which may not be the expected result.
context.Window.InsetsController?.Show(WindowInsets.Type.SystemBars());So, we may need to validate if the user has StatusBarVisible and NavigationBar visible before enter full screen save it on a variable or somewhere, and then when returning we show only what was visible. :)
What do you think @jsuarezruiz ?
Good point. Agree. I will review it shortly. Thanks for all the feedback.
Also, we need to validate which is the status of the current SystemBars settings are on the app, because for example, I may have an application that only shows the StatusBar and not the navigation bar, so by doing this, we are showing status and navigation bar which may not be the expected result.
context.Window.InsetsController?.Show(WindowInsets.Type.SystemBars());So, we may need to validate if the user has StatusBarVisible and NavigationBar visible before enter full screen save it on a variable or somewhere, and then when returning we show only what was visible. :) What do you think @jsuarezruiz ?Good point. Agree. I will review it shortly. Thanks for all the feedback.
Updated adding more validations etc.
Hello @jsuarezruiz , is this going to be available in .NET MAUI 8 GA? 🙂👍🏻
@jfversluis, @tj-devel709 Added you as reviewers. Could you take a look when you can? Thanks.
@jsuarezruiz can you retarget net9.0 ?