How to hangup for everyone with the Call Composite. #2687
alkwa-msft
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The leaveCall function allows for the ability to hang up for everyone but its not easily accessible today. While today there is no UI to flip between the different ways to end the call. For prototyping purposes we can override what happens when we try to call the leaveCall function on the adapter.
adapter.leaveCall = adapter.leaveCall.bind(adapter, true);
Now whenever we call adapter.leaveCall it will call adapter.leaveCall(true) which will hangup for everyone.
If we are going to change up the functionality of the leave call button we may want to change up the text as well for that button.
Choose an explicit locale to pass in for the composite
import { COMPOSITE_LOCALE_EN_US } from '@azure/communication-react';
Override the specific key that will be used on the endCallButton component
props.locale.component.strings.endCallButton.label = "End call";
Ensure the locale is being passed into the composite
`
Gist: https://gist.github.com/alkwa-msft/7a382a8a5e46dedd03a28af1ca7f8322
Beta Was this translation helpful? Give feedback.
All reactions