@bits-innovate/react-native-vstarcam 1.0.39 → 1.0.40
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.
|
@@ -80,7 +80,6 @@ public class VStarCamModule extends ReactContextBaseJavaModule {
|
|
|
80
80
|
put("ACAE", "EEGDFHBLKGJIGEJLEKGOFMEDHAMHHJNAGGFABMCOBGJOLHLJDFAFCPPHGILKIKLMANNHKEDKOINIBNCPJOMK:vstarcam2018"); // Try VSTH params
|
|
81
81
|
put("ACDG", "EEGDFHBLKGJIGEJLEKGOFMEDHAMHHJNAGGFABMCOBGJOLHLJDFAFCPPHGILKIKLMANNHKEDKOINIBNCPJOMK:vstarcam2018"); // Same as ACAE/VSTH
|
|
82
82
|
put("ACAQ", "EEGDFHBLKGJIGEJLEKGOFMEDHAMHHJNAGGFABMCOBGJOLHLJDFAFCPPHGILKIKLMANNHKEDKOINIBNCPJOMK:vstarcam2018"); // Same as ACAE/VSTH
|
|
83
|
-
put("ACAG", "EEGDFHBLKGJIGEJLEKGOFMEDHAMHHJNAGGFABMCOBGJOLHLJDFAFCPPHGILKIKLMANNHKEDKOINIBNCPJOMK:vstarcam2018"); // Same as ACAE/VSTH
|
|
84
83
|
// Fallback for unknown prefixes
|
|
85
84
|
put("DEFAULT", "EBGBEMBMKGJMGAJPEIGIFKEGHBMCHMNFGKEGBFCBBMJELILDCJADCIOLHHLLJBKEAMMBLCDGONMDBJCJJPNFJP");
|
|
86
85
|
}};
|
|
@@ -155,7 +154,7 @@ public class VStarCamModule extends ReactContextBaseJavaModule {
|
|
|
155
154
|
|
|
156
155
|
// Client tracking - maps our clientPtr to actual SDK client handle
|
|
157
156
|
// Made static so VStarCamVideoView can access SDK pointers
|
|
158
|
-
private static Map<Integer, ClientInfo> clients = new
|
|
157
|
+
private static Map<Integer, ClientInfo> clients = new HashMap<>();
|
|
159
158
|
private boolean isNativeLibraryLoaded = false;
|
|
160
159
|
private boolean isP2PInitialized = false;
|
|
161
160
|
|
|
@@ -461,8 +460,8 @@ public class VStarCamModule extends ReactContextBaseJavaModule {
|
|
|
461
460
|
return;
|
|
462
461
|
}
|
|
463
462
|
|
|
464
|
-
// Generate
|
|
465
|
-
int ourClientPtr =
|
|
463
|
+
// Generate our own client ID (hash of deviceId) and store mapping
|
|
464
|
+
int ourClientPtr = Math.abs(deviceId.hashCode());
|
|
466
465
|
|
|
467
466
|
ClientInfo clientInfo = new ClientInfo();
|
|
468
467
|
clientInfo.deviceId = deviceId;
|
|
@@ -866,6 +865,10 @@ public class VStarCamModule extends ReactContextBaseJavaModule {
|
|
|
866
865
|
} catch (Exception e) {
|
|
867
866
|
Log.e(TAG, "checkMode JNI call failed", e);
|
|
868
867
|
}
|
|
868
|
+
} else {
|
|
869
|
+
Log.w(TAG, "checkMode skipped: clientInfo=" + clientInfo +
|
|
870
|
+
", jniApiClass=" + (jniApiClass != null) +
|
|
871
|
+
", sdkPtr=" + (clientInfo != null ? clientInfo.sdkClientPtr : "null"));
|
|
869
872
|
}
|
|
870
873
|
|
|
871
874
|
// Mode > 0 means connected (1=P2P, 2=Relay, 3=Socket)
|