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

Call state doesn't change after accepted #1550

Open
1 of 3 tasks
ohri31 opened this issue Nov 1, 2024 · 1 comment
Open
1 of 3 tasks

Call state doesn't change after accepted #1550

ohri31 opened this issue Nov 1, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@ohri31
Copy link

ohri31 commented Nov 1, 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

I have setup an app that needs to have video calling.

I invoke a call in the following way:

`async function handleCall(callUserId: string) {
if (!client) {
return;
}

const callId = uuidv4();
const call = client.call("default", callId);

await call.microphone.enable();
await call.camera.disable();

await call.getOrCreate({
  ring: true,
  data: {
    members: [{ user_id: userId }, { user_id: callUserId }],
  },
});

}
`
After I invoke the call, both users get the corresponding Incoming/Outgoing call screen.

This is the component:

const getCallContent = useCallback(() => { switch (state) { case CallingState.RINGING: return isCallCreatedByMe ? ( <CustomOutgoingVideoCall call={call} onHangupCallHandler={() => call.leave()} /> ) : ( <CustomIncomingVideoCall call={call} onAcceptCallHandler={() => call.join()} onRejectCallHandler={() => call.reject()} /> ); case CallingState.LEFT: return <></>; case CallingState.IDLE: return <></>; default: return ( <WindView className="w-[100%] flex flex-grow"> <CallContent /> </WindView> ); } }, [call, isCallCreatedByMe, state]);

So when the call is invoked, the state becomes RINGING - but after the called user accepts, the state doesn't update on either of those two devices and just stays the same.

Is this a bug - or am I missing something?

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

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

Version

1.2.8

Env:

Fill out what's applicable

React / JS client

  • Browser [e.g. chrome, safari]

React Native

  • OS: iOS
  • Device or emulator: Simulator

Node JS client

  • Node version

Additional context
Add any other context about the problem here.

@ohri31 ohri31 added the bug Something isn't working label Nov 1, 2024
@oliverlaz
Copy link
Member

hi @ohri31, thanks for raising this issue. It is a bit hard to understand where the problem is.
Can you please share how you have set up the components where:

  • Call is initiated (call.getOrCreate())
  • Call is provided to the component tree (<StreamCall call={call}>....</StreamCall>)
  • CallingState is read (const state = useCallCallingState())

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

2 participants