This commit is contained in:
Your Name
2026-03-13 14:08:52 +08:00
parent 08dd9cd307
commit eb283f008b
667 changed files with 8425 additions and 27053 deletions
@@ -564,6 +564,15 @@ const startCall = async () => {
statusText.value = '等待初始化完成...'
await new Promise(resolve => setTimeout(resolve, 2000))
// 生产包中 init 返回后引擎可能尚未挂载,短暂轮询等待 .calls 可用
for (let i = 0; i < 6; i++) {
if (typeof TUICallKitAPI.calls === 'function') break
await new Promise(resolve => setTimeout(resolve, 500))
}
if (typeof TUICallKitAPI.calls !== 'function') {
throw new Error('通话引擎未就绪,请关闭窗口后重试或刷新页面')
}
console.log('初始化完成,显示通话界面')
statusText.value = '准备发起通话...'