livekit / client-sdk-swift

LiveKit Swift Client SDK. Easily build live audio or video experiences into your mobile app, game or website.
https://livekit.io
Apache License 2.0
173 stars 84 forks source link

Network switch & Chat not working when user joined using canSubscribe=false #416

Open royatanu94 opened 1 week ago

royatanu94 commented 1 week ago

Describe the bug Network switch not working when joined using canSubscribe=false "canPublish": true,"canPublishData": true in ios app.
Chat msg not received at IOS app.

SDK Version 2.0.10/11

iOS/macOS Version IOS17

Xcode Version 15.4

Steps to Reproduce Issue1:

  1. Join user1 ( "canPublish": true,"canPublishData": true,"canSubscribe": true ) from web app.
  2. Join user2 ( "canPublish": true,"canPublishData": true,"canSubscribe": false ) from ios app.
  3. Publish video from both of the user
  4. Switch internet of IOS device from mobile data to wifi or vice versa OR turn on/off internet
  5. In IOS app its seen that user1 joined from web will leave room
  6. IOS user will be disconnected with (Timed out)
  7. Even tried with increasing reconnect retry from 3 to more. Still same error
  8. Some unexpected behaviour is also seen after disconnecting room, participant view reopens

Issue2:

  1. Join user1 ( "canPublish": true,"canPublishData": true,"canSubscribe": true ) from web app.
  2. Join user2 ( "canPublish": true,"canPublishData": true,"canSubscribe": false ) from ios app.
  3. Send msg from web to ios
  4. IOS app will not receive any data msg. Tried with sdk 2.0.11 still not worked.

Expected behavior Network switch & chat msg should work fine for user joined using canSubscribe=false

Screenshots

File (1)

Logs Issue1: issue1.txt

Issue2: issue2.txt