- To Submit a Ticket for Unexpected Video SDK Behavior:
I am developing a service using the Zoom Video SDK that involves video calls. When executing stream.startAudio from an iPhone, I occasionally encounter an OPERATION_TIMEOUT error. This operation is triggered by a user clicking a button, and I have confirmed that the microphone permissions are granted before this process.
Additionally, after the OPERATION_TIMEOUT occurs, there are rare cases where the “current-audio-change.{“action”:“join”,“type”:“computer”}” event is triggered about 2 to 3 minutes later, allowing audio to join. The “auto-play-audio-failed” event does not occur.
Could you please investigate the cause of this issue?
Below is a snippet of the code I am using.
const startAudio = useCallback(async () => {
if (!stream) return
if (isStartedRef.current) return
setIsProcessing(true)
return await stream
.startAudio()
.catch((e) => {
handleError(e)
throw e
})
}, [stream, handleError])
useEffect(() => {
if (!client) return
const handler = () => {
console.error('failed auto-play')
}
client.on('auto-play-audio-failed', handler)
return () => {
client.off('auto-play-audio-failed', handler)
}
}, [client])
useEffect(() => {
const handler = (payload: CurrentAudioChangePayloadType) => {
console.log('current-audio-change.' + JSON.stringify(payload))
const { action } = payload
if (action === AudioChangeAction.Join) {
setIsProcessing(false)
setIsStared(true)
isStartedRef.current = true
} else if (action === AudioChangeAction.Leave) {
setIsProcessing(false)
setIsStared(false)
isStartedRef.current = false
} else if (action === AudioChangeAction.Muted) {
setIsMute(true)
localStorage.setItem(MIC_STATUS_KEY, 'true')
} else if (action === AudioChangeAction.Unmuted) {
setIsMute(false)
localStorage.setItem(MIC_STATUS_KEY, 'false')
}
}
client.on('current-audio-change', handler)
return () => {
client.off('current-audio-change', handler)
}
}, [client])
useEffect(() => {
const handler = (payload: any) => {
console.log('device-permission-change' + JSON.stringify(payload))
}
client.on('device-permission-change', handler)
return () => {
client.off('device-permission-change', handler)
}
}, [client])
<button disabled={isAudioProcessing} onClick={startAudio}>
start audio
</button>
- For General & Integrations Related Guidance: https://community.zoom.com/
Format Your New Topic as Follows:
Video SDK Type and Version
@zoom/videosdk: 1.11.6
Error?
stream.startAudio()
=> OPERATION_TIMEOUT
Troubleshooting Routes
I am not sure if it is the same phenomenon, but after entering the session from the following site using the same device, I also received an OPERATION_TIMEOUT notification at the bottom right. About a minute later, a popup appeared asking to use the camera, and I was able to join after granting permission.
https://videosdk.dev/uitoolkit/
How To Reproduce