API
ZegoUIKitPrebuiltCallService
init
You must call this method as soon as the user logs in (or re-logs in, auto-logs in) to your app.
/**
* Initialization of call service
* @param {number} appID - Your appID
* @param {string} appSign - Your appSign
* @param {string} userID - User unique identification
* @param {string} userName - userName
* @param {Array} plugins - ZIM and ZPNs
* @param {Map} config - CallInvitation personalized configuration
*/
init(appID, appSign, userID, userName, plugins, config = {})
uninit
Should be used in pairs with the init
API.
/**
* Deinitialize call service
*/
uninit()
useSystemCallingUI
If you want to use the system call UI, you must call this method in index.js
.
/**
* Use system call UI.
* @param {Array} plugins - ZIM and ZPNs
*/
useSystemCallingUI(plugins)
hangUp
If you want to hang up the call, you can call this method.
/**
* Hang up current call.
* @param {boolean} showConfirmation - If show confirmation dialog.
*/
hangUp(showConfirmation = false)
sendCallInvitation
You can call this method to send a call invitation.
/**
* Send call Invitation.
* @param {Array} invitees - The invitee users.
* @param {boolean} isVideoCall - Is video call or voice call.
* @param {object} navigation - Use to navigate to other page.
* @param {Map} options - Call invitation options.
*/
sendCallInvitation(invitees, isVideoCall, navigation, options)