@bits-innovate/react-native-vstarcam 1.0.60 → 1.0.61

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +13 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bits-innovate/react-native-vstarcam",
3
- "version": "1.0.60",
3
+ "version": "1.0.61",
4
4
  "description": "React Native bridge for VStarCam P2P SDK",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
package/src/index.ts CHANGED
@@ -440,7 +440,19 @@ class VStarCamClient {
440
440
  for (const pair of pairs) {
441
441
  const [key, value] = pair.split("=");
442
442
  if (key && value) {
443
- result[key.trim()] = value.trim();
443
+ let cleanKey = key.trim();
444
+ // VStarCam often prefix variables with 'var '
445
+ if (cleanKey.startsWith("var ")) {
446
+ cleanKey = cleanKey.substring(4).trim();
447
+ }
448
+
449
+ let cleanValue = value.trim();
450
+ // Remove surrounding quotes if present
451
+ if (cleanValue.startsWith('"') && cleanValue.endsWith('"')) {
452
+ cleanValue = cleanValue.substring(1, cleanValue.length - 1);
453
+ }
454
+
455
+ result[cleanKey] = cleanValue;
444
456
  }
445
457
  }
446
458
  return result;