@bits-innovate/react-native-vstarcam 1.0.50 → 1.0.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -236,6 +236,11 @@ public class VStarCamModule extends ReactContextBaseJavaModule {
236
236
  Log.e(TAG, "Cannot initialize P2P: native library or JNIApi not available");
237
237
  return;
238
238
  }
239
+
240
+ if (VStarCamModule.isP2PInitialized) {
241
+ Log.d(TAG, "P2P system already initialized. Skipping JNIApi.init() to prevent C++ SDK crashes during hot reload.");
242
+ return;
243
+ }
239
244
 
240
245
  try {
241
246
  // Create dynamic proxy for ClientStateListener
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bits-innovate/react-native-vstarcam",
3
- "version": "1.0.50",
3
+ "version": "1.0.51",
4
4
  "description": "React Native bridge for VStarCam P2P SDK",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",