Skip to content

Improve self video view in call (dragging, rounded corners, enlarge, ...) - #6935

Open
mahibi wants to merge 11 commits into
masterfrom
improveSelfVideo
Open

mahibi wants to merge 11 commits into
masterfrom
improveSelfVideo

Conversation

@mahibi

@mahibi mahibi commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

What the branch changes

  • introduce a Self-video renderer
  • Dragging: the tile can be dragged within the area above the call controls. It starts in the upper right corner and goes back there when the screen is rotated. Positions also behave correctly in right-to-left layouts.
  • Look: rounded corners, a shadow and a thin border.
  • Sizes: tapping toggles between regular and enlarged. The enlarged view has a switch-camera button and an enlarge button. Enlarging again covers about 85% of the area above the call controls and dims the rest; tapping the dimmed area shrinks it back.
  • Camera off: the tile is hidden while video is off.
  • Loading: a spinner shows until the first camera frame has been drawn.
  • Camera switch: the tile does a flip like the iOS app.

🖼️ Screenshots

🏚️ Before 🏡 After
grafik grafik grafik grafik

Video

Screen_recording_20261020_123214.mp4

🏁 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?)

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Summary by CodeRabbit

  • New Features
    • Redesigned the self-video preview with draggable positioning, expandable and collapsible views, responsive sizing, and loading feedback.
    • Added controls for switching cameras and resizing the self-video preview.
    • Improved camera switching with visual transitions and updated orientation handling.
    • Added accessibility labels for self-video controls.
  • Bug Fixes
    • Tapping outside the end-call popup now reliably dismisses it.
    • Self-video rendering and camera state update more consistently.

Render the self video into a TextureView based renderer instead of a
SurfaceViewRenderer, so it can be clipped and moved like a regular view.
The tile can be dragged within the call area, is reset to its initial
position on rotation and is slightly larger than before.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Tapping the self video toggles between the regular and an enlarged
size instead of switching the camera. The enlarged view shows buttons
to switch the camera and to enlarge the self video even further.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
The largest self video size now covers most of the area above the call
controls and dims the views behind it. The self video tile gets a
shadow and a border so it is recognizable as an overlay, and the
renderer clips itself to rounded corners.

The self video tile is only shown while the local video is enabled.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
The initial position is calculated from the current width until the
self video is dragged, so it keeps its margin to the edge after the
screen was rotated. Use absolute offsets so that position and dragging
are not mirrored in RTL layouts.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
The self video is flipped around its vertical axis when switching
between the cameras, like the iOS app does. If the first frame of the
switched camera is not rendered yet when the self video is edge-on, the
loading indicator is shown until it is, so the last frame of the prior
camera is not shown after the flip.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@mahibi mahibi added this to the 25.1.0 milestone Oct 20, 2026
@mahibi mahibi self-assigned this Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

📱 QA build

Download app-qa-debug.apk
QR code Open the QR code for this download
Commit 60180b7
Version 6935
Available until 7 days after this build

The QA build installs alongside a released Nextcloud app, so you can keep
using your existing install while testing.

Downloading the file requires a GitHub account, so open this link on the
device you want to test on, or transfer the APK to it.

- Place the self video below the reactions, the lower hand button and
  the end call popup so they stay visible and can be tapped.
- Apply drag movements to the current position so none get lost.
- Reset the self video size when the video is turned off.
- Let tapping the large self video shrink it to the enlarged size, like
  the shrink button and the scrim do.
- Release the reference to the renderer when it is released.
- While switching the camera, cover the self video without a loading
  indicator and fade in the new video once it is rendered. The loading
  indicator is only shown if switching takes longer.
- Use the Nextcloud SPDX copyright header for TextureViewRenderer.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
The large self video was 85% of the call area in both dimensions, so in
landscape a portrait camera frame was cropped heavily. It now uses the
largest size with the aspect ratio of the received frames that fits into
that area.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
If the switched camera is not ready yet, show the loading indicator as
soon as the flip finished instead of after a fixed delay.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
- Hide the switch camera button if there is only one camera.
- Pause rendering of the self video while it is hidden, e.g. in
  picture-in-picture mode.
- Apply the mirroring of the switched camera before its first frame is
  rendered.
- Keep the self video covered until the first frame of the switched
  camera was rendered, and do not start another switch until then.
- Close the end call popup menu on any touch outside of it, including
  touches on the self video.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@mahibi mahibi changed the title Improve self video Improve self video view in call (dragging, rounded corners, enlarge, ...) Oct 20, 2026
@mahibi
mahibi marked this pull request as ready for review October 20, 2026 10:56
@mahibi
mahibi requested a review from rapterjet2004 October 20, 2026 10:56
@mahibi mahibi added the 3. to review Waiting for reviews label Oct 20, 2026
@rapterjet2004

Copy link
Copy Markdown
Contributor

There seems to be some behavioral changes here, are they intended?

Behaviour changes to confirm with the author:
- Tapping the tile used to switch the camera. Now it enlarges the tile, and switching takes two taps: enlarge first,
then the switch button.
- Any touch outside the end-call popup now closes it, including touches on the call controls. Before, only touches
on the participant grid or the parent layout did. This seems like an improvement.
- In large mode, the reactions overlay and the lower-hand/end-call row (flexboxLayout) are drawn above the scrim and remain tappable.

@mahibi

mahibi commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Oct 20, 2026

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: nextcloud/talk-android/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 323d09df-fbb5-44c6-96e9-7b134f2c2eb7
📥 Commits

Reviewing files that changed from the base of the PR and between 35c0d23 and 60180b7.

📒 Files selected for processing: 5
  • app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt
  • app/src/main/java/com/nextcloud/talk/call/components/SelfVideoView.kt
  • app/src/main/java/com/nextcloud/talk/call/components/TextureViewRenderer.kt
  • app/src/main/res/layout/call_activity.xml
  • app/src/main/res/values/strings.xml

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

📝 Walkthrough

The call screen now uses an interactive self-video tile with animated display modes, dragging, camera controls, and frame-aware rendering. CallActivity supplies the tile’s video state and camera-switch result. Touches outside the end-call popup dismiss it.

Changes: Call self-video

Layer / File(s) Summary
TextureView rendering lifecycle
app/src/main/java/com/nextcloud/talk/call/components/TextureViewRenderer.kt
A new TextureViewRenderer manages EGL rendering, frame callbacks, aspect ratio, mirroring, visibility, and surface lifecycle.
Interactive self-video tile
app/src/main/java/com/nextcloud/talk/call/components/SelfVideoView.kt
SelfVideoView adds animated tile modes, constrained dragging, camera-switch controls, loading feedback, and TextureViewRenderer integration.
Call screen integration and popup dismissal
app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt, app/src/main/res/layout/call_activity.xml, app/src/main/res/values/strings.xml
CallActivity passes video state and camera-switch callbacks to SelfVideoView. The layout places the tile in the participant grid. Touches outside the end-call popup dismiss it. New string resources label the tile controls.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant SelfVideoView
  participant CallActivity
  participant CameraCapturer
  participant TextureViewRenderer
  SelfVideoView->>CallActivity: Request camera switch
  CallActivity->>CameraCapturer: Switch camera
  CameraCapturer-->>CallActivity: Report switch result
  CallActivity-->>SelfVideoView: Return resulting orientation
  SelfVideoView->>TextureViewRenderer: Wait for next frame
  TextureViewRenderer-->>SelfVideoView: Report rendered frame
Loading

Suggested reviewers: andyscherzinger

Merge Risk: ⚪ Minimal · up to 60180

The self-video changes appear mergeable after normal build and test checks.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 21.95% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 41 functions across 3 files. (2 skipped: … Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Title check Passed The title clearly summarizes the primary change: improving the self-video view with dragging, rounded corners, and enlargement.
Description check Passed The description explains the implemented behavior, includes screenshots and a video, and completes the checklist. The template's TODO section is omitted, but the description is otherwise complete and …
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the implemented behavior, includes screenshots and a video, and completes the checklist. The template's TODO section is omitted, but the description is otherwise complete and relevant.

Full details: Docstring Coverage

Explanation

Docstring coverage is 21.95% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 41 functions across 3 files. (2 skipped: 2 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@mahibi

mahibi commented Oct 20, 2026

Copy link
Copy Markdown
Collaborator Author

There seems to be some behavioral changes here, are they intended?

Behaviour changes to confirm with the author:

  • Tapping the tile used to switch the camera. Now it enlarges the tile, and switching takes two taps: enlarge first,
    then the switch button.

this was intended. Some users complained that switching by tap is not intuitive.

  • Any touch outside the end-call popup now closes it, including touches on the call controls. Before, only touches
    on the participant grid or the parent layout did. This seems like an improvement.

fine 👍

  • In large mode, the reactions overlay and the lower-hand/end-call row (flexboxLayout) are drawn above the scrim and remain tappable.

that's the expected behavior in my opinion.
Or if i get you wrong, could you paste a screenshot?

@github-actions

Copy link
Copy Markdown
Contributor

Codacy

Lint

TypemasterPR
Warnings138139
Errors1515

SpotBugs

CategoryBaseNew
Bad practice77
Correctness88
Dodgy code4040
Internationalization33
Malicious code vulnerability33
Performance88
Security1111
Total8080

Lint increased!

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 AI assisted

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants