jitsi / jitsi-meet

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
https://jitsi.org/meet
Apache License 2.0
22.77k stars 6.67k forks source link

Disable immersive mode under some circumstances #12812

Open Bleuzen opened 1 year ago

Bleuzen commented 1 year ago

Is your feature request related to a problem you are facing?

When in a call in the Android app, immersive mode (fullscreen) is always active. This has the following drawbacks:

Describe the solution you'd like

Immersive mode (fullscreen) only makes sense when using the phone in landscape mode to view for example a screenshare of another user. In most other cases I could think of, the fullscreen mode is only more annoying instead of useful.

Describe alternatives you've considered

Allow users to manually toggle fullscreen/immersive mode. This could be a new button in the in-call UI or just tapping for example in a video or profile picture.

AlvaroBro commented 1 year ago

Hi,

I am not sure if this is the right place, but I will comment (and ask) anyway, because lately I have been struggling with an issue regarding (I think) the immersive mode using the Jitsi SDK for Android. I don't know if @Bleuzen is asking about the Jitsi app or the SDK, but I am referring to the SDK.

There is a Jitsi feature flag to enable/disable the full screen mode. But, even if I set it to false, my app ends up in full screen, or immersive mode, or something. What I see is that it messes my action bar. For example, an Activity containing a JitsiMeetView will have its action bar displaced upwards. This happens after "join" is performed.

This would not happen when I was using SDK version 3.10, but I moved to SDK 7.0.1 and now I have this problem.

@saghul any clues? :)

Here is a screenshot:

IMG1674734640949

saghul commented 1 year ago

I see the navigation bar there (bottom white bar) which suggests immersive mode is not enabled. What we did do also is eot enable the status bar. That's what seems to overlap with your action bar. Are you expecting no status bar at all?

AlvaroBro commented 1 year ago

Hi. The behaviour I'd like to achieve is not to modify the visibility of the navigation bar, the status bar, or the action bar. Just embed the Jitsi view as part of my layout without affecting those bars or anything else. Does that make sense? Thanks!

saghul commented 1 year ago

I makes sense, yeah :-)

What I don't know is why the status bar is covering the action bar. You are not in full-screen / immerisive mode in that screenshot...

AlvaroBro commented 1 year ago

I managed to make a workaround. I think the problem is that react native is messing with the activity.

The workaround was to not allow react native to have a reference to my activity.

Long story short, I managed to do this by creating a dummy activity and doing:

JitsiMeetActivityDelegate.onHostResume(createDummyFragmentActivity(MyApplication.getAppContext()));

I know, very hack'ish, but I have been diving in the react native code for a while and I think that react native is just a big hack itself haha. Specifically, I think this hack might break the handling of the android permissions when Jitsi needs to ask for permission to access the camera or mic, because I think it needs the reference to the activity in order to work.

saghul commented 1 year ago

Yes it does need a reference to the activity for a bunch of stuff, but interesting findings!

F-Goncalves commented 1 year ago

I am experiencing the exact same issue. However, AlvaroBro's solution is not working for me. It would be nice if someone experienced with React can look into it.

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Bleuzen commented 1 year ago

It will be closed

it won't

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Bleuzen commented 1 year ago

so we play this game of having a conversation every 2 months now huh? very fun idea

saghul commented 1 year ago

We updated our immersive mode library so fixing at least the status bar is attainable.

I think we'll likely want to keep the navigation bar hidden, but we can now test easily at least.

github-actions[bot] commented 11 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Bleuzen commented 11 months ago

cool bot I like you too

github-actions[bot] commented 9 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Bleuzen commented 8 months ago

It will be closed

image

andreas-umbricht commented 7 months ago

Thanks a lot for the good laugh @Bleuzen

Anyways, I experience exactly the same problem as @AlvaroBro, where if I use the JitsiMeetView my statusBar seems to go to fullscreen for some seconds, even tough the fullscreen.enabled=false flag is set. Also the statusBar icon color is set to white, which would be desirable to set manually.

saghul commented 7 months ago

where if I use the JitsiMeetView my statusBar seems to go to fullscreen for some seconds, even tough the fullscreen.enabled=false flag is set.

What SDK version is that?

Also the statusBar icon color is set to white, which would be desirable to set manually.

I'd take a PR making that configurable.

github-actions[bot] commented 5 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Bleuzen commented 5 months ago

-

github-actions[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Bleuzen commented 3 months ago

-

saghul commented 3 months ago

I gave this a shot but didn't quite work as expected :-/

FlavioGoncalves-Cayas commented 3 months ago

Thanks a lot for the good laugh @Bleuzen

Anyways, I experience exactly the same problem as @AlvaroBro, where if I use the JitsiMeetView my statusBar seems to go to fullscreen for some seconds, even tough the fullscreen.enabled=false flag is set. Also the statusBar icon color is set to white, which would be desirable to set manually.

I still have the same issue. During the page where we join the meeting the actionBar is rendered behind the statusBar even when isFullscreen is false (maybe there is a check missing). Generally, I think when using the JitsiMeetView, it should not mess with the StatusBar at all. Is there something we can do about it?

saghul commented 3 months ago

Do you have any specific suggestions?

FlavioGoncalves-Cayas commented 3 months ago

I looked into the code (although I am not very familiar with React) and it seems like in RootNavigationContainer.tsx the StatusBar is set to always be translucent:

<StatusBar animated = { true } backgroundColor = 'transparent' barStyle = { 'light-content' } translucent = { true } />

However this commit https://github.com/jitsi/jitsi-meet/commit/ab809875f7f19ad95a2d2fa60de28cd9655357c7 changed the StatusBar only during the Conference. Shouldn't the check for fullscreenEnabled also be in the RootNavigationContainer?

saghul commented 3 months ago

Not quite, the way it works in RN is that you can have multiple components and IIRC the innermost one takes precedence. So on Android we want to hide it because it clashes with the full-screen plugin somehow. On iOS we show the status bar always, which is what we wanted on Android too, but ran into issues.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Bleuzen commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity.

This bot has been manually identified as annoying because it has not contributed anything but spam.