@bits-innovate/react-native-vstarcam 1.0.56 → 1.0.57

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.
@@ -82,6 +82,25 @@ public class VStarCamVideoViewManager extends SimpleViewManager<VStarCamVideoVie
82
82
  );
83
83
  }
84
84
 
85
+ // Handle commands dispatched with NUMERIC IDs (from UIManager.Commands)
86
+ @Override
87
+ public void receiveCommand(@NonNull VStarCamVideoView view, int commandId, @Nullable ReadableArray args) {
88
+ switch (commandId) {
89
+ case COMMAND_START_STREAM:
90
+ view.startStream();
91
+ break;
92
+ case COMMAND_STOP_STREAM:
93
+ view.stopStream();
94
+ break;
95
+ case COMMAND_CAPTURE_SNAPSHOT:
96
+ if (args != null && args.size() > 0) {
97
+ view.captureSnapshot(args.getString(0));
98
+ }
99
+ break;
100
+ }
101
+ }
102
+
103
+ // Handle commands dispatched with STRING IDs (legacy/fallback)
85
104
  @Override
86
105
  public void receiveCommand(@NonNull VStarCamVideoView view, String commandId, @Nullable ReadableArray args) {
87
106
  switch (commandId) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bits-innovate/react-native-vstarcam",
3
- "version": "1.0.56",
3
+ "version": "1.0.57",
4
4
  "description": "React Native bridge for VStarCam P2P SDK",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",