Skip to content

Instantly share code, notes, and snippets.

@nemo0
Created May 28, 2023 07:38
Show Gist options
  • Save nemo0/6a27b9f115753195d95b7d25679ae43c to your computer and use it in GitHub Desktop.
Save nemo0/6a27b9f115753195d95b7d25679ae43c to your computer and use it in GitHub Desktop.
Call.js Make Call Function
const makeCall = ({ userId, isVideoCall }) => {
const dialParams = { ...defaultCallParams, ...{ userId, isVideoCall } };
let call = SendBirdCall.dial(dialParams, (call, error) => {
if (error) {
setCall(null);
}
});
call = setDefaultCallHandlers(call);
setConnecting(true);
setCall(call);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment