maui icon indicating copy to clipboard operation
maui copied to clipboard

[Android] Allow full screen videos from WebView

Open jsuarezruiz opened this issue 2 years ago • 5 comments

Description of Change

Allow full screen videos from WebView.

image

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

jsuarezruiz avatar Jun 06 '23 12:06 jsuarezruiz

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.

vhugogarcia avatar Jun 06 '23 14:06 vhugogarcia

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 ?

vhugogarcia avatar Jun 06 '23 14:06 vhugogarcia

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.

jsuarezruiz avatar Jun 07 '23 06:06 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.

Updated adding more validations etc.

jsuarezruiz avatar Jun 19 '23 10:06 jsuarezruiz

Hello @jsuarezruiz , is this going to be available in .NET MAUI 8 GA? 🙂👍🏻

vhugogarcia avatar Oct 18 '23 11:10 vhugogarcia

@jfversluis, @tj-devel709 Added you as reviewers. Could you take a look when you can? Thanks. ​

jsuarezruiz avatar Jan 18 '24 12:01 jsuarezruiz

@jsuarezruiz can you retarget net9.0 ?

rmarinho avatar Mar 20 '24 14:03 rmarinho