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
176 stars 85 forks source link

if participant leave, delegate participantDidDisconnect participant.identity is null #300

Closed wzJun1 closed 2 weeks ago

wzJun1 commented 6 months ago

Describe the bug If someone leaves and triggers participantDidConnect, then we cannot get identity in RemoteParticipant

SDK Version The latest version

iOS/macOS Version ALL

temporary solution

Participant.swift

func cleanUp(notify _notify: Bool = true) async {
    await unpublishAll(notify: _notify)
    // Reset state
    _state.mutate { $0 = State(sid: $0.sid, identity: $0.identity, name: $0.name) }
    //_state.mutate { $0 = State(sid: "", identity: "", name: "") }
}
hiroshihorie commented 6 months ago

Thanks for the report will fix this

wzJun1 commented 5 months ago

I think the problem arises again, after participantDidDisconnect is called, identity is null.

patryk-sredzinski commented 3 months ago

I can confirm this as well

Zrzut ekranu 2024-03-27 o 15 08 23

hiroshihorie commented 3 months ago

This PR https://github.com/livekit/client-sdk-swift/pull/361 should fix it.

kwanghyun-two commented 2 months ago

I have same issue. When the fix will be available?

patryk-sredzinski commented 1 month ago

@hiroshihorie Can we get this one fixed?

hiroshihorie commented 3 weeks ago

Hello this is fixed in https://github.com/livekit/client-sdk-swift/pull/408 Will be in next release

hiroshihorie commented 2 weeks ago

This should be fixed now