Skip to content

FCE-2645: Investigate iOS error when leaving screen with screen sharing#542

Open
MiloszFilimowski wants to merge 2 commits into
mainfrom
mfilimowski/FCE-2645-screenshare-error
Open

FCE-2645: Investigate iOS error when leaving screen with screen sharing#542
MiloszFilimowski wants to merge 2 commits into
mainfrom
mfilimowski/FCE-2645-screenshare-error

Conversation

@MiloszFilimowski
Copy link
Copy Markdown
Collaborator

Description

  • Add presentBroadcastPicker() to useScreenShare() (mobile-client) and the underlying SDK
  • Bump packages/react-native-webrtc to FCE-2645 (adds the native helper + presentBroadcastPicker RCT method)
  • FishjamChat: on iOS, route disconnect / toggle-off through the system Stop Broadcast sheet; user taps Leave again after stopping

Motivation and Context

Leaving the call with screen sharing active on iOS triggered a system "Screen sharing stopped" error dialog because stopStreaming() force-closes the host socket and the extension can only terminate via
finishBroadcastWithError(_:). Presenting the system Stop sheet routes termination through broadcastFinished() instead, which is dialog-free.

Documentation impact

  • Documentation update required
  • Documentation updated in another PR
  • No documentation update required

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)

@MiloszFilimowski MiloszFilimowski requested a review from Copilot May 25, 2026 12:19
@linear
Copy link
Copy Markdown

linear Bot commented May 25, 2026

FCE-2645

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses an iOS-specific issue when leaving a call while screen sharing is active by exposing a presentBroadcastPicker() API and updating the FishjamChat example to route “stop broadcast” through the system sheet instead of force-stopping the stream.

Changes:

  • Extended useScreenShare() result type to include presentBroadcastPicker(): Promise<void> (iOS-only behavior).
  • Wired presentBroadcastPicker through the mobile-client useScreenShare() override.
  • Updated the FishjamChat example to use the system Stop Broadcast sheet on iOS instead of calling stopStreaming() directly.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
packages/mobile-client/src/overrides/types.ts Adds presentBroadcastPicker to the public UseScreenShareResult type (with iOS-specific doc).
packages/mobile-client/src/overrides/hooks.ts Exposes presentBroadcastPicker from @fishjam-cloud/react-native-webrtc via the mobile-client useScreenShare() override.
examples/mobile-client/fishjam-chat/app/room/[roomName].tsx Uses presentBroadcastPicker() on iOS for disconnect and toggle-off flows when screen sharing is active.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread examples/mobile-client/fishjam-chat/app/room/[roomName].tsx Outdated
Comment thread examples/mobile-client/fishjam-chat/app/room/[roomName].tsx
Comment thread examples/mobile-client/fishjam-chat/app/room/[roomName].tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants