Skip to content

feat(call): share own screen from the device - #6934

Draft
mahibi wants to merge 7 commits into
masterfrom
shareOwnScreen
Draft

mahibi wants to merge 7 commits into
masterfrom
shareOwnScreen

Conversation

@mahibi

@mahibi mahibi commented Oct 20, 2026 •

Copy link
Copy Markdown
Collaborator

resolve #1530

paused until #6793 is merged


Add an entry to the more call actions dialog to start and stop sharing the device screen. The screen is captured via MediaProjection while the call foreground service additionally has the mediaProjection type.

Without MCU a screen peer connection is created for each participant in the call; with MCU a screen publisher is created and the participants are requested to receive an offer for it. "unshareScreen" is sent when the sharing stops.

Assisted-by: Claude Code:claude-opus-5-5

🖼️ Screenshots

🏚️ Before 🏡 After
B A

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

🤖 AI (if applicable)

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

Add an entry to the more call actions dialog to start and stop sharing
the device screen. The screen is captured via MediaProjection while the
call foreground service additionally has the mediaProjection type.

Without MCU a screen peer connection is created for each participant in
the call; with MCU a screen publisher is created and the participants
are requested to receive an offer for it. "unshareScreen" is sent when
the sharing stops.

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
@mahibi mahibi added the 2. developing Work in progress label Oct 20, 2026
- Capture the whole display instead of the call window, which shrinks in
  picture in picture or split screen
- Route answers and candidates of "screen" connections to the connection
  sharing the local screen unless the sender is the broadcaster, so they
  do not reach the connection receiving the remote screen
- Do not open data channels on the MCU screen publisher and always send
  the offer from connections sharing the local screen
- Guard screen sharing state against concurrent changes from the main
  and signaling threads
- Stop screen sharing when the own participant is no longer in the call
- Update the screen sharing permission when the conversation is loaded
  and when the participant permissions change during the call, stopping
  an active share if the permission is revoked
- Inform the user when screen sharing can not be started yet

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
- Clean up when the screen capture fails to start due to an expired or
  revoked media projection
- Ignore screen sharing actions in the call foreground service when no
  call is ongoing, so the service is not kept running after a call
- Guard the screen capturer against concurrent use from the main and
  signaling threads
- Prefer the screen sharing permission from signaling over the one from
  the conversation, and share the permission check between both
- Follow display rotation while the call is in background
- Refresh the items and observers of the more call actions dialog every
  time it is shown

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
…icture

While the own screen is shared, leaving the call with the back or home
buttons moves it to the background instead of showing picture in
picture on top of the shared screen. The call notification shows a
screen sharing icon in the status bar and states that the screen is
shared.

The screen sharing icons are now the same as in the web client.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
- Do not enter picture in picture while asking for the screen sharing
  permission, as the permission dialog moves the call to background
- Cancel screen sharing that is still being started when it is stopped
  from the signaling thread, for example when leaving the call
- Use the signaling session to find the own participant permissions
- Do not crash when updating picture in picture if it was not possible
  when the call started
- Update the call notification even if the foreground service type can
  not be changed while in background
- Handle devices without a screen capture permission dialog

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
- Explain that notifications and microphone access are needed to share
  the screen when the call foreground service is not running
- Ignore connection events from a previous screen share publisher
- Do not update picture in picture after the activity was destroyed
- Do not crash when the call is hung up while the screen capture starts
- Update the screen sharing entry of the more call actions dialog while
  it is shown

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Like for call recording, a red indicator is shown next to the
conversation name while the own screen is shared. Clicking it asks
whether to stop sharing the screen.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
@github-actions

Copy link
Copy Markdown
Contributor

📱 QA build

Download app-qa-debug.apk
QR code Open the QR code for this download
Commit 2b5e038
Version 6934
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.

@github-actions

Copy link
Copy Markdown
Contributor

Codacy

Lint

TypemasterPR
Warnings138138
Errors1515

SpotBugs

CategoryBaseNew
Bad practice77
Correctness88
Dodgy code4040
Internationalization33
Malicious code vulnerability33
Performance87
Security1111
Total8079

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

share screen from android

1 participant