oxen-io / session-android

A private messenger for Android.
https://getsession.org
GNU General Public License v3.0
1.86k stars 170 forks source link

[SES-1652] Swap video views in calls #1533

Closed ThomasSession closed 2 months ago

ThomasSession commented 2 months ago

Fixing: SES-1652 SES-560

Added the ability to swap videos during a call. I changed Ryan's approach to only use two renderer instead of four for optimisation.

I found several issues with the video that I hopefully addressed in this PR:

Known issue:

ThomasSession commented 2 months ago
  • follow the users portrait-lock

It should already follow the portrait lock from the isAutoRotateOn(). It will only check once but I don't think there is a way to know the device orientation otherwise. We could of course add the config change handling form the manifest, and request to self handle orientation changes. This would void the need for the sensor as you get that information for free, and which is what I initially started the code with. But it also means we need a separate layout for landscape instead of forcing to portrait and rotating only certain elements like we are doing now.

bemusementpark commented 2 months ago

It should already follow the portrait lock from the isAutoRotateOn().

yeah, but we could just add the listener, and then check this in the listener as the dead simple solution, no? possible issue if you're landscape and then you set portrait-lock. Depends how pedantic we want to get. But you could foresee that a user would have portrait lock (on/off) and start a call, and realise they want it (off/on) change the system setting and think it doesn't work, but they just have to press back and enter the call again for it to take effect... :/