FCE-2645: Investigate iOS error when leaving screen with screen sharing#542
Open
MiloszFilimowski wants to merge 2 commits into
Open
FCE-2645: Investigate iOS error when leaving screen with screen sharing#542MiloszFilimowski wants to merge 2 commits into
MiloszFilimowski wants to merge 2 commits into
Conversation
Contributor
There was a problem hiding this comment.
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 includepresentBroadcastPicker(): Promise<void>(iOS-only behavior). - Wired
presentBroadcastPickerthrough the mobile-clientuseScreenShare()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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
presentBroadcastPicker()touseScreenShare()(mobile-client) and the underlying SDKpackages/react-native-webrtcto FCE-2645 (adds the native helper +presentBroadcastPickerRCT method)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 viafinishBroadcastWithError(_:). Presenting the system Stop sheet routes termination throughbroadcastFinished()instead, which is dialog-free.Documentation impact
Types of changes
not work as expected)