react-native-webrtc-kaleidoscope 0.0.0 → 0.0.1

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 (3) hide show
  1. package/NOTICE.md +35 -0
  2. package/README.md +65 -3
  3. package/package.json +69 -3
package/NOTICE.md ADDED
@@ -0,0 +1,35 @@
1
+ # Notices and Attributions
2
+
3
+ react-native-webrtc-kaleidoscope ships under the MIT license (see [LICENSE](./LICENSE)). This document tracks third-party sources, standards, and trademarks referenced by the library and the effects it ships.
4
+
5
+ ## Runtime peer dependency
6
+
7
+ - **react-native-webrtc** — MIT license. <https://github.com/react-native-webrtc/react-native-webrtc>. The `track._setVideoEffects(...)` JS surface, the Android `ProcessorProvider` registry, and the iOS `RTCVideoFrameProcessor` protocol all originate upstream. This package is a consumer of, not a fork of, that codebase.
8
+
9
+ ## Native segmentation backends (used by the `blur` effect)
10
+
11
+ - **Apple Vision** (iOS) — system framework. `VNGeneratePersonSegmentationRequest`. Subject to the Apple SDK License Agreement.
12
+ - **MLKit Selfie Segmentation** (Android) — Apache License 2.0. Distributed by Google as a managed AAR. <https://developers.google.com/ml-kit/vision/selfie-segmentation>.
13
+ - **MediaPipe Selfie Segmentation** (web) — Apache License 2.0. Loaded as an `optionalDependency` so native consumers do not bundle the WASM payload. <https://github.com/google-ai-edge/mediapipe>.
14
+
15
+ ## Algorithmic and architectural references
16
+
17
+ - **mrousavy/FaceBlurApp** — segmentation + GPU composite at 60–120 FPS. Different plumbing (camera-preview pipeline, not a WebRTC track), but the algorithmic shape of "mask + blurred copy + composite" is the same.
18
+ - **Volcomix/virtual-background** — TFLite WASM reference for the web blur composite.
19
+
20
+ ## Trademarks
21
+
22
+ - "Apple", "Vision", "Core Image", and related Apple marks are trademarks of Apple Inc. Used here as nominative references only.
23
+ - "Google", "MLKit", and "MediaPipe" are trademarks of Google LLC. Used here as nominative references only.
24
+ - "WebRTC" is a project of the W3C and IETF.
25
+
26
+ This package is not affiliated with, endorsed by, or certified by Apple, Google, the W3C, or the `react-native-webrtc` project.
27
+
28
+ ## Forward-looking discipline
29
+
30
+ Effects added after v0.1 that depend on new third-party code or registered marks must:
31
+
32
+ 1. Cite the source (with a stable URL and version) in the effect's source code.
33
+ 2. Add an attribution section to this document.
34
+ 3. Disclaim affiliation, endorsement, or certification where appropriate.
35
+ 4. Treat trademarked names as **nominative references** only.
package/README.md CHANGED
@@ -1,7 +1,69 @@
1
1
  # react-native-webrtc-kaleidoscope
2
2
 
3
- Live video effects (mirror, blur, more) for `react-native-webrtc`, packaged as a managed-Expo-friendly Expo Module.
3
+ > Live video effects for `react-native-webrtc`, packaged as a managed-Expo-friendly Expo Module. v0.1 ships **mirror** and **blur** on iOS, Android, and web.
4
4
 
5
- **This is a placeholder.** The package name is reserved while active development is in progress. The first usable release will be `v0.1` shipping the `mirror` and `blur` effects on iOS, Android, and web.
5
+ ## Status
6
6
 
7
- Source: <https://github.com/simiancraft/react-native-webrtc-kaleidoscope>
7
+ Pre-1.0. Active development. The bootstrap-and-ship plan in [`bootstrap-and-ship-v0-1.md`](./bootstrap-and-ship-v0-1.md) (root, while it exists) is the source of truth for v0.1.
8
+
9
+ The first usable release will be `v0.1.0`, shipping `mirror` and `blur` on all three platforms. Until then, the package is published as `0.1.0-alpha.x` for name reservation and integration testing.
10
+
11
+ ## Install
12
+
13
+ ```sh
14
+ bun add react-native-webrtc react-native-webrtc-kaleidoscope
15
+ ```
16
+
17
+ `react-native-webrtc` is a peer dependency. Install it explicitly.
18
+
19
+ ## Configure
20
+
21
+ Add the config plugin to `app.config.ts`:
22
+
23
+ ```ts
24
+ export default {
25
+ expo: {
26
+ plugins: ['react-native-webrtc', 'react-native-webrtc-kaleidoscope'],
27
+ },
28
+ };
29
+ ```
30
+
31
+ Then rebuild native code:
32
+
33
+ ```sh
34
+ bunx expo prebuild
35
+ ```
36
+
37
+ ## Use
38
+
39
+ ```ts
40
+ import { mediaDevices } from 'react-native-webrtc';
41
+ import { applyVideoEffects } from 'react-native-webrtc-kaleidoscope';
42
+
43
+ const stream = await mediaDevices.getUserMedia({ video: true });
44
+ const [track] = stream.getVideoTracks();
45
+
46
+ applyVideoEffects(track, ['blur']); // background blur
47
+ applyVideoEffects(track, ['mirror']); // horizontal flip
48
+ applyVideoEffects(track, []); // clear all effects
49
+ ```
50
+
51
+ Effects chain in array order.
52
+
53
+ ## Platform support
54
+
55
+ | Platform | Mirror | Blur | Backend |
56
+ |---|---|---|---|
57
+ | iOS ≥ 15 | ✓ | ✓ | Apple Vision + Core Image |
58
+ | Android ≥ API 24 | ✓ | ✓ | MLKit Selfie Segmentation + RenderScript / RenderEffect |
59
+ | Chrome / Edge | ✓ | ✓ | MediaStreamTrackProcessor + MediaPipe Selfie Segmentation (WASM) |
60
+ | Safari | ✓ | ⚠ | No Insertable Streams; throws a typed error |
61
+ | Firefox | ✓ | ⚠ | Same; capability-check before calling |
62
+
63
+ ## Reference
64
+
65
+ - [CONTRIBUTING.md](./CONTRIBUTING.md) — setup, scripts, commit conventions
66
+ - [AGENTS.md](./AGENTS.md) — agent / contributor orientation
67
+ - [SECURITY.md](./SECURITY.md) — security policy and reporting
68
+ - [NOTICE.md](./NOTICE.md) — third-party attributions
69
+ - Sibling projects: [chromonym](https://github.com/simiancraft/chromonym), [unitforge](https://github.com/simiancraft/unitforge) — same OSS-hygiene template
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "react-native-webrtc-kaleidoscope",
3
- "version": "0.0.0",
4
- "description": "Live video effects (mirror, blur, more) for react-native-webrtc, packaged as a managed-Expo-friendly Expo Module. Placeholder; active development in progress.",
3
+ "version": "0.0.1",
4
+ "description": "Live video effects (mirror, blur, more) for react-native-webrtc, packaged as a managed-Expo-friendly Expo Module. v0.1: mirror + blur on iOS, Android, and web.",
5
5
  "keywords": [
6
6
  "react-native",
7
7
  "react-native-webrtc",
@@ -26,11 +26,77 @@
26
26
  "bugs": {
27
27
  "url": "https://github.com/simiancraft/react-native-webrtc-kaleidoscope/issues"
28
28
  },
29
+ "type": "module",
30
+ "sideEffects": false,
31
+ "main": "./src/index.ts",
32
+ "module": "./dist/index.js",
33
+ "react-native": "./src/index.ts",
34
+ "types": "./dist/index.d.ts",
35
+ "exports": {
36
+ ".": {
37
+ "types": "./dist/index.d.ts",
38
+ "react-native": "./src/index.ts",
39
+ "browser": "./dist/index.web.js",
40
+ "import": "./dist/index.js",
41
+ "default": "./dist/index.js"
42
+ },
43
+ "./app.plugin.js": "./app.plugin.js",
44
+ "./expo-module.config.json": "./expo-module.config.json",
45
+ "./package.json": "./package.json"
46
+ },
29
47
  "files": [
30
48
  "README.md",
31
- "LICENSE"
49
+ "LICENSE",
50
+ "NOTICE.md"
32
51
  ],
52
+ "scripts": {
53
+ "clean": "rm -rf dist plugin/build",
54
+ "build": "bun run clean && tsgo && tsc -p plugin/",
55
+ "typecheck": "tsgo --noEmit",
56
+ "lint": "biome check",
57
+ "lint:fix": "biome check --write",
58
+ "format": "biome format --write .",
59
+ "test": "bun test",
60
+ "check:package": "publint && attw --pack --profile esm-only",
61
+ "check:knip": "knip",
62
+ "demo": "cd demo && bun run start",
63
+ "demo:ios": "cd demo && bun run ios",
64
+ "demo:android": "cd demo && bun run android",
65
+ "demo:web": "cd demo && bun run web"
66
+ },
67
+ "peerDependencies": {
68
+ "expo": ">=51.0.0",
69
+ "react": ">=18.2.0",
70
+ "react-native": ">=0.74.0",
71
+ "react-native-webrtc": ">=124.0.0"
72
+ },
73
+ "optionalDependencies": {
74
+ "@mediapipe/selfie_segmentation": "^0.1.1675465747"
75
+ },
76
+ "devDependencies": {
77
+ "@arethetypeswrong/cli": "^0.18.2",
78
+ "@biomejs/biome": "^2.4.13",
79
+ "@expo/config-plugins": "^9.0.0",
80
+ "@semantic-release/changelog": "^6.0.3",
81
+ "@semantic-release/git": "^10.0.1",
82
+ "@semantic-release/npm": "^13.1.5",
83
+ "@types/bun": "^1.3.12",
84
+ "@types/react": "^18.3.12",
85
+ "@typescript/native-preview": "7.0.0-dev.20260417.1",
86
+ "expo": "^51.0.0",
87
+ "expo-modules-core": "^1.12.0",
88
+ "knip": "^6.5.0",
89
+ "publint": "^0.3.18",
90
+ "react": "18.3.1",
91
+ "react-native": "0.74.5",
92
+ "react-native-webrtc": "^124.0.7",
93
+ "semantic-release": "^25.0.3",
94
+ "typescript": "^5.6.0"
95
+ },
33
96
  "publishConfig": {
34
97
  "access": "public"
98
+ },
99
+ "engines": {
100
+ "node": ">=20"
35
101
  }
36
102
  }