Skip to content

Conversation

@mahibi
Copy link
Collaborator

@mahibi mahibi commented May 7, 2025

This PR migrates the call grid to Compose. (This will avoid handling with wrong video renderer handling in the XML GridView, so it will fix #4916 )

Additionally the Design is made similar to the other platforms (Same background colors for cells...).

This PR could solve other issues related to calls as well, but architecture needs to improve further.

How to test

  • Please test different call scenarios like different amount of participants, switch to PIP mode and back, test portrait and landscape mode, voice only call, video call, ...

🖼️ Screenshots

Android before Android after
grafik grafik

to compare...

Web iOS
grafik grafik

Arrangement of cells with different amount of participants and portrait/landscape mode. Scolling is enabled when there are too many participants to match on the screen

grafik

🚧 TODO

  • ...

🏁 Checklist

  • ⛑️ Tests (unit and/or integration) are included or not needed
  • 🔖 Capability is checked or not needed
  • 🔙 Backport requests are created or not needed: /backport to stable-xx.x
  • 📅 Milestone is set
  • 🌸 PR title is meaningful (if it should be in the changelog: is it meaningful to users?)

@mahibi mahibi self-assigned this May 7, 2025
@mahibi mahibi force-pushed the improveCallGrid branch from 747939f to 3082e4a Compare May 7, 2025 15:37
@mahibi mahibi added this to the 21.1.0 milestone May 7, 2025
@mahibi mahibi added the 3. to review Waiting for reviews label May 7, 2025
@mahibi mahibi marked this pull request as ready for review May 7, 2025 16:24
@mahibi mahibi mentioned this pull request May 7, 2025
6 tasks
mahibi added 22 commits May 12, 2025 13:55
Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
For now, instead to measure height mixed from xml and compose, assume a fixed height for the xml views (callInfosLinearLayout and callControls) to limit the grid height.
They is not a nice solution and should be replaced once everything is migrated to compose.

Signed-off-by: Marcel Hibbe <[email protected]>
improve pip handling a bit

minor changes

Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
at least as another cell. fullscreen needs to be implemented

Signed-off-by: Marcel Hibbe <[email protected]>
at least as another cell. fullscreen needs to be implemented

Signed-off-by: Marcel Hibbe <[email protected]>
mahibi added 3 commits May 12, 2025 13:55
Signed-off-by: Marcel Hibbe <[email protected]>
Signed-off-by: Marcel Hibbe <[email protected]>
@mahibi mahibi force-pushed the improveCallGrid branch from 3082e4a to 962972d Compare May 12, 2025 11:56
@mahibi mahibi added 2. developing Work in progress and removed 3. to review Waiting for reviews labels May 12, 2025
mahibi added 2 commits May 12, 2025 15:01
move ParticipantUiState into ParticipantDisplayItem

Signed-off-by: Marcel Hibbe <[email protected]>
depending on amount of participants, voiceOnly call and enabled/disabled own video, the contents of PIP windows are updated.

This will be further improved when speaker-view is implemented.

Signed-off-by: Marcel Hibbe <[email protected]>
@mahibi mahibi force-pushed the improveCallGrid branch from 61244d3 to 6a048fd Compare May 13, 2025 09:41
@mahibi mahibi changed the title Improve call grid Improve call grid & Picture-inPicture view May 13, 2025
@mahibi mahibi added 3. to review Waiting for reviews and removed 2. developing Work in progress labels May 13, 2025
@mahibi mahibi enabled auto-merge May 13, 2025 10:36
..by using a BoxWithConstraints

Signed-off-by: Marcel Hibbe <[email protected]>
@github-actions
Copy link
Contributor

APK file: https://www.kaminsky.me/nc-dev/android-artifacts/4947-talk.apk

qrcode

To test this change/fix you can simply download above APK file and install and test it in parallel to your existing Nextcloud Talk app.

@github-actions
Copy link
Contributor

Codacy

Lint

TypemasterPR
Warnings9989
Errors99

SpotBugs

CategoryBaseNew
Bad practice66
Correctness22216
Dodgy code7167
Internationalization33
Malicious code vulnerability33
Performance44
Security11
Total310100

@sowjanyakch
Copy link
Contributor

sowjanyakch commented May 13, 2025

I tested this PR (with a Pixel6a) - PIP mode works as expected. Tested audio and video calls both in portrait and landspace mode.
For audio call, the call grid is a scrollable view for both portrait and landscape mode.
scrollable portrait mode

Copy link
Contributor

@sowjanyakch sowjanyakch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mahibi
Copy link
Collaborator Author

mahibi commented May 14, 2025

I tested this PR - PIP mode works as expected. Tested audio and video calls both in portrait and landspace mode. For audio call, the call grid is a scrollable view for both portrait and landscape mode.

I guess it is caused by the workaround that i used for now (either the condition fails or the hardcoded dp's mess it up).
(can't reproduce with my devices, so maybe only happens for some devices/screen resolutions. Sowjanya tested with Pixel6a)

    val heightForNonGridComponents = if (isVoiceOnlyCall && !isInPipMode) {
        // this is a workaround for now. It should ~summarize the height of callInfosLinearLayout and callControls
        // Once everything is migrated to jetpack, this workaround should be obsolete or solved in a better way
        240.dp
    } else {
        0.dp
    }

    val gridHeight = LocalConfiguration.current.screenHeightDp.dp - heightForNonGridComponents

As the calls itself work, i suggest to merge this for now and a fix will follow later today (to be released with RC1 today) or for RC2. I will have to review and merge other PRs that should make it into RC1..

@sowjanyakch sowjanyakch self-requested a review May 14, 2025 08:00
@mahibi mahibi merged commit f8bfa04 into master May 14, 2025
15 of 16 checks passed
@mahibi mahibi deleted the improveCallGrid branch May 14, 2025 08:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Video streams are not restored after switching to PIP and back

3 participants