GetStream / stream-video-js

GetStream JavaScript Video SDK
https://getstream.io/video/sdk/
Other
69 stars 24 forks source link

[Bug] Session participants are not updated after the call ends #1561

Open vihan85 opened 3 weeks ago

vihan85 commented 3 weeks ago

Which package/packages do you use?

Describe the bug Session participants are not updated after the call ends

To Reproduce Steps to reproduce the behavior:

  1. User 1 create call with two participants
  2. user 1 leave call
  3. user 2 end call
  4. user 1 call useCallSession() and see useCallSession().participants result

Screenshots If applicable, add screenshots to help explain your problem. Version

Expected behavior After end call useCallSession().participants = []

oliverlaz commented 2 weeks ago

hi @vihan85, thanks for reporting this issue. This behavior is intentional and standardized across all of our SDKs. We are evaluating whether to introduce a flag that enables state updates even after the call transitions to LEFT state. I'll keep you posted on this.

Can you please share what's your use case? Maybe we can suggest another solution.

vihan85 commented 1 week ago

hi @oliverlaz,

I'm developing a functionality when during a group call, users can join whenever they want by clicking the "join call" button, and the button will disappear if the call ends.

Qodestackr commented 1 week ago
"@stream-io/node-sdk": "^0.2.5",
"@stream-io/video-react-sdk": "^1.1.3",

For me, a blank screen is presented...
vihan85 commented 1 week ago

Hi @oliverlaz,

Can you help me?

Qodestackr commented 1 week ago

[client]: Failed to connect Error: {"code":"","StatusCode":"","message":"initial WS connection could not be established","isWSFailure":true}

I keep getting this error, esp in production

Qodestackr commented 1 week ago

Hello @oliverlaz

oliverlaz commented 1 week ago

hi @vihan85,

We can't change this behavior as it might be a breaking change for some customers who rely on the existing behavior. We might consider adding an option on the call instance that can control this behavior in the future.

Currently, I can suggest you one workaround:

const onLeaveCallButtonPress = async () => {
  await call.leave(); // I assume this is your current logic

  // Add this:
  // This will re-establish the connection and will enable state updates until you do `call.leave()` again.
  // Keep in mind this may create a memory leak, as this call instance won't be automatically disposed.
  await call.get();
}

Please let me know if this helps.

oliverlaz commented 1 week ago

@Qodestackr, can you please open another issue?