@lumiastream/obsbot-sdk 0.0.2 → 0.0.4

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.
package/README.md ADDED
@@ -0,0 +1,68 @@
1
+ # OBSBOT SDK (Lumia Fork)
2
+
3
+ Node.js native wrapper for OBSBOT cameras used by Lumia plugins.
4
+
5
+ ## Prerequisites
6
+
7
+ - Node.js `>=22.18.0` (matches `package.json`)
8
+ - Build tools for native addons:
9
+ - macOS: Xcode Command Line Tools
10
+ - Windows: Visual Studio Build Tools + Python
11
+ - Linux: `build-essential`, Python, and compiler toolchain
12
+
13
+ ## Build On Each Platform
14
+
15
+ Run these steps on each target OS/arch machine (for example: `darwin-arm64`, `win32-x64`):
16
+
17
+ ```bash
18
+ npm install
19
+ npm run build
20
+ ```
21
+
22
+ What this does:
23
+
24
+ - `npm run build` compiles `build/Release/obsbot_native.node` and stages prebuilds
25
+ - staging copies platform binaries into:
26
+ - `prebuilds/<platform>-<arch>/obsbot_native.node`
27
+ - and runtime libs (`libdev.dylib`, `libdev.dll`, `w32-pthreads.dll`, or `libdev.so*`) when applicable
28
+
29
+ If you need to re-stage without rebuilding, run:
30
+
31
+ ```bash
32
+ npm run stage-prebuild
33
+ ```
34
+
35
+ ## Optional Mirror To Another Repo
36
+
37
+ To mirror staged prebuilds into another directory while staging:
38
+
39
+ ```bash
40
+ OBSBOT_PREBUILD_MIRROR=/absolute/path/to/third_party/obsbot-sdk/prebuilds npm run stage-prebuild
41
+ ```
42
+
43
+ This writes to `<mirror>/<platform>-<arch>/`.
44
+
45
+ ## Validate The Result
46
+
47
+ After staging, verify expected files exist:
48
+
49
+ ```bash
50
+ ls -la prebuilds/$(node -p "process.platform + '-' + process.arch")
51
+ ```
52
+
53
+ Expected at minimum:
54
+
55
+ - `obsbot_native.node`
56
+ - platform runtime library files for that OS
57
+
58
+ ## Using In The OBSBOT Plugin
59
+
60
+ If the plugin depends on npm package `@lumiastream/obsbot-sdk`, publish/update the package, then update plugin dependency version.
61
+
62
+ For local testing without publishing:
63
+
64
+ ```bash
65
+ npm pack
66
+ # then in plugin repo:
67
+ # npm install /absolute/path/to/obsbot-sdk/<generated-tarball>.tgz
68
+ ```
@@ -101,6 +101,10 @@ class BaseDevice {
101
101
  }
102
102
 
103
103
  // --- Power & Sleep ---
104
+ getDevRunStatus() {
105
+ return this._native.getDevRunStatus?.();
106
+ }
107
+
104
108
  setDevRunStatus(status) {
105
109
  return this._native.setDevRunStatus?.(status);
106
110
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lumiastream/obsbot-sdk",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "Node.js native module for OBSBOT webcams (forked for Lumia Stream).",
5
5
  "main": "dist/index.js",
6
6
  "type": "commonjs",
@@ -9,7 +9,7 @@
9
9
  },
10
10
  "scripts": {
11
11
  "install": "node scripts/install.js",
12
- "build": "node-gyp rebuild",
12
+ "build": "node-gyp rebuild && node scripts/stage-prebuild.js",
13
13
  "stage-prebuild": "node scripts/stage-prebuild.js"
14
14
  },
15
15
  "keywords": [
@@ -91,6 +91,7 @@ function main() {
91
91
  process.exit(1);
92
92
  }
93
93
 
94
+ fs.rmSync(destinationDir, { recursive: true, force: true });
94
95
  ensureDir(destinationDir);
95
96
  const addonDestination = path.join(destinationDir, "obsbot_native.node");
96
97
  fs.copyFileSync(addonSource, addonDestination);
Binary file