```js <ChatBox onStart={onStart} onError={(type, error) => { console.debug(type, error); }} /> ```
npm install @wanghongl/chat-box``js`
onError={(type, error) => {
console.debug(type, error);
}}
/>
`js``
const onStart = async (ref: ChatBoxImperativeHandle) => {
await ref?.startCall({
mode: 'video',
config: {
appId: 'xxxx',
appKey: 'xxxx',
conversationId: 'xxxxx',
platform: 'duix.com'
},
durationBalanceSec: 60 * 4,
sessionTimeOutSec: 0
});
};