Video SDK Type and Version
For Web (React): “@zoom1234/videosdk”: “^1.5.5”,
For React Native: “@zoom1234/react-native-videosdk”: “^1.5.3”,
Description
There are two applications. The first on React Native, and the other one on the React. Between them is making video connection with ZoomVideoSDK. Approximately, the video connection time, before users will be able see each other, is 10-15 seconds. It is possible to reduce connection time, for example to 5 seconds, and how can I do it?
The code:
React Native
const sessionJoinListener = zoom.addListener(EventType.onSessionJoin, async (session: any) => {
try {
zoom.session.getSessionName().then(setSessionName)
const mySelf: ZoomVideoSdkUser = new ZoomVideoSdkUser(session.mySelf)
const remoteUsers: ZoomVideoSdkUser[] = await zoom.session.getRemoteUsers()
await zoom.videoHelper.startVideo()
await zoom.audioHelper.startAudio()
} catch (error) {
console.log('Error ', error)
}
})
React
const onVideoStateChange = async (payload) => {
try {
if (payload.action === 'Start') {
await stream.renderVideo(
document.querySelector('#participant-canvas'),
payload.userId,
1920,
1080,
0,
0,
3
)
} else if (payload.action === 'Stop') {
await stream.stopRenderVideo(
document.querySelector('#participant-canvas'),
payload.userId
)
}
} catch (error) {
console.log('Error ', error)
}
}
client.on('peer-video-state-change', onVideoStateChange)
How To Reproduce
- User from React Native does zoom session
- User from React immediately joins the session
- The video appears when the event EventType.onSessionJoin is triggered in the React Native. It is where the video starts with «await zoom.videoHelper.startVideo()»
- React user can see the video when ‘peer-video-state-change’ is triggered
- In both users, the time is 10-15 seconds before the video is established
React
- Device: MacBook Pro
- OS: macOS Monterey 12.0.1 (21A559)
- Browser: Chrome 108.0.5359.124
- SharedArrayBuffer is enabled
React Native
- Device: iPhone 7Plus
- OS: iOS 15.7.1
- In other iPhones the same situation