@bits-innovate/react-native-vstarcam 1.0.22 → 1.0.24
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.
|
@@ -77,6 +77,8 @@ public class VStarCamModule extends ReactContextBaseJavaModule {
|
|
|
77
77
|
put("VSKM", "EIHGFNBAKMIIGLJEEAHKFEEJHLNBHCNIGFFDBLCMAKJNLELPDDAGCNOOGILMJFLJAOMKLADEOEMJAPCDJCNPJF:veepai2024");
|
|
78
78
|
put("VSLL", "EIHGFOBBKKIOGNJKENHHFKEEGMNOHLMNHBFKBBDOAHJBLMKIDLAJCAPIGDLBJGLKAOMILNDJOJMGAHCLJHNMJG:veepai2024");
|
|
79
79
|
put("ACAE", "EEGDFHBLKGJIGEJLEKGOFMEDHAMHHJNAGGFABMCOBGJOLHLJDFAFCPPHGILKIKLMANNHKEDKOINIBNCPJOMK:vstarcam2018"); // Try VSTH params
|
|
80
|
+
put("ACDG", "EEGDFHBLKGJIGEJLEKGOFMEDHAMHHJNAGGFABMCOBGJOLHLJDFAFCPPHGILKIKLMANNHKEDKOINIBNCPJOMK:vstarcam2018"); // Same as ACAE/VSTH
|
|
81
|
+
put("ACAQ", "EEGDFHBLKGJIGEJLEKGOFMEDHAMHHJNAGGFABMCOBGJOLHLJDFAFCPPHGILKIKLMANNHKEDKOINIBNCPJOMK:vstarcam2018"); // Same as ACAE/VSTH
|
|
80
82
|
// Fallback for unknown prefixes
|
|
81
83
|
put("DEFAULT", "EBGBEMBMKGJMGAJPEIGIFKEGHBMCHMNFGKEGBFCBBMJELILDCJADCIOLHHLLJBKEAMMBLCDGONMDBJCJJPNFJP");
|
|
82
84
|
}};
|
|
@@ -564,23 +566,32 @@ public class VStarCamModule extends ReactContextBaseJavaModule {
|
|
|
564
566
|
|
|
565
567
|
Log.d(TAG, "Calling JNIApi.login(" + clientInfo.sdkClientPtr + ", " + username + ", ***)");
|
|
566
568
|
|
|
569
|
+
boolean loginSuccess = false;
|
|
567
570
|
try {
|
|
568
571
|
loginMethod.invoke(null, clientInfo.sdkClientPtr, username, password);
|
|
569
572
|
Log.d(TAG, "JNIApi.login returned normally");
|
|
573
|
+
loginSuccess = true;
|
|
570
574
|
} catch (java.lang.reflect.InvocationTargetException ite) {
|
|
571
|
-
|
|
572
|
-
|
|
575
|
+
Throwable cause = ite.getCause();
|
|
576
|
+
Log.e(TAG, "JNIApi.login threw exception: " + cause, cause);
|
|
577
|
+
// Don't rethrow - return false instead to prevent crash
|
|
578
|
+
promise.resolve(false);
|
|
579
|
+
return;
|
|
573
580
|
} catch (Throwable t) {
|
|
574
581
|
Log.e(TAG, "JNIApi.login crashed: " + t.getMessage(), t);
|
|
575
|
-
|
|
582
|
+
// Don't rethrow - return false instead to prevent crash
|
|
583
|
+
promise.resolve(false);
|
|
584
|
+
return;
|
|
576
585
|
}
|
|
577
586
|
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
587
|
+
if (loginSuccess) {
|
|
588
|
+
clientInfo.isLoggedIn = true;
|
|
589
|
+
clientInfo.username = username;
|
|
590
|
+
clientInfo.password = password;
|
|
591
|
+
}
|
|
582
592
|
|
|
583
|
-
|
|
593
|
+
Log.d(TAG, "JNIApi.login completed with result: " + loginSuccess);
|
|
594
|
+
promise.resolve(loginSuccess);
|
|
584
595
|
} catch (Exception e) {
|
|
585
596
|
Log.e(TAG, "clientLogin failed", e);
|
|
586
597
|
promise.reject("LOGIN_ERROR", e.getMessage());
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bits-innovate/react-native-vstarcam",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
4
4
|
"description": "React Native bridge for VStarCam P2P SDK",
|
|
5
5
|
"main": "src/index.ts",
|
|
6
6
|
"types": "src/index.ts",
|
|
@@ -43,4 +43,4 @@
|
|
|
43
43
|
"react": "*",
|
|
44
44
|
"react-native": "*"
|
|
45
45
|
}
|
|
46
|
-
}
|
|
46
|
+
}
|