connection-change
event no longer firing in Zoom Video SDK Web v2.x
Description
When using Zoom Video SDK for Web v2.x, the connection-change
event is no longer firing when joining or leaving a session.
This behavior worked correctly in v1.12.17, where the event triggered:
{ state: 'Connected' }
* is emitted when calling join{ state: 'Closed' }
* is emitted when calling leave
We are using this event to detect session connection status, but with v2.x it seems to be silently broken or changed.
Browser Console Error
No error is thrown. The callback simply doesn’t execute.
Which Web Video SDK version?
- Working on:
@zoom/videosdk
v1.12.17 - Not working on:
@zoom/videosdk
v2.x.x
Video SDK Code Snippets
const log = useCallback((state: ConnectionChangePayload) => {
console.log(state)
}, [])
useEffect(() => {
client.on('connection-change', log)
return () => {
client.off('connection-change', log)
}
}, [log])
To Reproduce
- Initialize the Zoom Video SDK client
- Join a session
- Leave the session
- Observe: no log is printed from the
connection-change
event
Device
- Device: MacBook Pro (M1)
- OS: macOS Sonoma 14.3
- Browser: Chrome
- Browser Version: 138.0.7204.101 (Official Build) (arm64)
Additional context
If this is an intentional change in the Zoom SDK v2.x, what is the new way to detect connection status transitions like join/leave?
Are there any alternative events or lifecycle hooks we should use to track connection state?
Please advise.