livekit / client-sdk-react-native

Official React Native SDK for LiveKit.
https://livekit.io
Apache License 2.0
123 stars 32 forks source link

Screen share track still created when broadcast button is canceled #157

Open davidliu opened 5 months ago

davidliu commented 5 months ago

We are experiencing an issue with screen sharing on iOS using React Native.

Initially, screen sharing starts successfully after tapping "Start Broadcast." It works fine every time when we tap "Start Broadcast" and receive the tracks. However, if we tap outside the broadcast handler, the popup closes, and screen sharing does not start. Although we receive a successful track from LiveKit, it is not initiated.

The problem begins here: we use this successful track for our custom logic to start/stop tracks of other users or send some data. However, this case is a false positive—screen sharing has not started, but we still receive the track.

Additionally, when we try to reconnect to the room afterward, we are unable to connect.

Framework: React Native ("0.74.1", "0.71.8") Platform: iOS

Dependencies:

"@livekit/react-native": "^2.1.1"
"@livekit/react-native-webrtc": "^114.1.4"
"livekit-client": "2.1.5"

Slack Message