Created
May 28, 2023 07:38
-
-
Save nemo0/6a27b9f115753195d95b7d25679ae43c to your computer and use it in GitHub Desktop.
Call.js Make Call Function
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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