Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 3 tasks
vihan85 opened this issue Nov 7, 2024 · 8 comments
Open
1 of 3 tasks

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

vihan85 opened this issue Nov 7, 2024 · 8 comments
Labels
bug Something isn't working

Comments

@vihan85
Copy link

vihan85 commented Nov 7, 2024

Which package/packages do you use?

  • @stream-io/video-react-sdk
  • @stream-io/video-react-native-sdk
  • @stream-io/video-client

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 = []

  • SDK version: @stream-io/video-react-sdk: 1.7.9
@vihan85 vihan85 added the bug Something isn't working label Nov 7, 2024
@oliverlaz
Copy link
Member

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
Copy link
Author

vihan85 commented Nov 15, 2024

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.

  • "join call" button just appear while useCallSession().participants.length > 0

@Qodestackr
Copy link

"@stream-io/node-sdk": "^0.2.5",
"@stream-io/video-react-sdk": "^1.1.3",

For me, a blank screen is presented...

@vihan85
Copy link
Author

vihan85 commented Nov 21, 2024

Hi @oliverlaz,

Can you help me?

@Qodestackr
Copy link

[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
Copy link

Hello @oliverlaz

@oliverlaz
Copy link
Member

oliverlaz commented Nov 21, 2024

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
Copy link
Member

@Qodestackr, can you please open another issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants