Closed alexstroukov closed 3 months ago
Hey @alexstroukov sorry to hear you're facing issues with your app. Looks like the issue comes from the provider being re-rendered by the navigation library. Why is the screen being re-rendered? Can you try wrapping the immediate parent of the component using the VideoSDK?
The provider maintains the state of the videocall, re-rendering the provider will reset the call. You'll have to make sure the component isn't re-rendered while the call is active.
@EkaanshArora its to do with how the https://github.com/wix/react-native-navigation library works. you register each screen wrapped with all of the providers and they get re rendered each time the screen is navigated to
Issue Summary:
This SDK requires the app to be wrapped by
ZoomVideoSdkProvider
, but when using wix/react-native-navigation as your navigation library each component is registered with its own providers as described here https://wix.github.io/react-native-navigation/api/component/#registering-a-component-wrapped-with-providersAs a result the SDK calls
initSdk
in the fileZoomVideoSdk
each time a screen is rendered and this causes the SDK to crash (android) and throw warning on iOS with the errorZoomVideoSDKError_Wrong_Usage
As a hack I managed to prevent it from crashing by caching the sdk initialisation in JS with
patch-package
patches/@zoom+react-native-videosdk+1.10.10.patch
npx react-native info