I’m encountering a delay when starting the microphone (and sometimes camera) using the Zoom Web Video SDK. It takes a long time to initialize or times out.
I suspect the delay might be network-related, but also possibly caused by my previous retry logic, which waits until the SDK throws an error (potentially after its own internal timeout) before retrying — resulting in a long delay overall.
We do not recommend retrying based on timeouts. If a retry is necessary, please only proceed after startVideo or startAudio explicitly return a rejected promise.
In the Video SDK, startAudio has a built-in timeout of 45 seconds.
We do not recommend retrying based on timeouts. If a retry is necessary, please only proceed after startVideo or startAudio explicitly return a rejected promise.
Understood. However, we’ve encountered some challenges in real-world usage and would appreciate your thoughts on this approach:
In our testing, startAudio() or startVideo() sometimes takes a long time to resolve — especially under poor network conditions. Since the internal timeout is 45 seconds, from a user experience perspective, this feels too long. It’s not ideal to make users wait that long without feedback.
That’s why we tried wrapping the SDK call in a shorter timeout (e.g. 5 seconds), since we observed that under normal conditions, both startAudio and startVideo typically complete within 2–3 seconds.
Our question:
Do you think it’s reasonable to apply a manual timeout of 5s to startAudio()/startVideo() to avoid long UI freezes?
In case of overlapping calls (e.g., when a retry is triggered before the SDK call internally resolves), we’ve seen logs like INVALID_OPERATION. Is this harmful, or just a safe way the SDK rejects redundant calls?
We’re looking for the best way to handle these operations gracefully under unstable network, while keeping UX responsive.
Do you think it’s reasonable to apply a manual timeout of 5s to startAudio()/startVideo() to avoid long UI freezes?
It’s not reasonable — a 5-second timeout is inappropriate. As you mentioned, it could involve network connections, and even if you retry after a timeout, you’d still need to reconnect, which would take just as much time.
Since startAudio/startVideo are asynchronous methods, you can provide feedback to the user through the UI by indicating that audio/video is being started — for example, by showing a loading indicator or disabling the control area. You shouldn’t automatically retry in such a short time frame.
In case of overlapping calls (e.g., when a retry is triggered before the SDK call internally resolves), we’ve seen logs like INVALID_OPERATION. Is this harmful, or just a safe way the SDK rejects redundant calls?
Yes, we reject duplicate calls to prevent inconsistent states.