Skip to content

Set Android minSdkVersion 26 and react-native-webgpu 0.10.1 in fishjam-chat - #610

Merged
MiloszFilimowski merged 3 commits into
mainfrom
fix/fishjam-chat-android-min-sdk
Sep 16, 2026
Merged

MiloszFilimowski merged 3 commits into
mainfrom
fix/fishjam-chat-android-min-sdk

Conversation

@MiloszFilimowski

@MiloszFilimowski MiloszFilimowski commented Sep 15, 2026 •

Copy link
Copy Markdown
Collaborator

Description

fishjam-chat now sets Android minSdkVersion to 26 through expo-build-properties. The example already had that package in its dependencies but never configured it.

["expo-build-properties", { "android": { "minSdkVersion": 26 } }]

Motivation and Context

After #606, a clean Android build of fishjam-chat fails:

react-native-webgpu/android/cpp/AndroidPlatformContext.h:232:15: error: 'AHardwareBuffer_allocate' is unavailable: introduced in Android 26

react-native-webgpu calls AHardwareBuffer APIs that exist only from Android 8.0 (API 26). Expo SDK 57 builds for API 24 by default, and nothing in the example raised it. A build from an existing android/ folder can still pass if that folder already had a higher minSdk.

Checked on main (fff4e57), arm64-v8a, with expo prebuild --platform android --clean and then ./gradlew app:assembleDebug:

  • Before: the build fails with the error above.
  • After: BUILD SUCCESSFUL.

Found while testing the React Native camera effects docs. The same step goes into those docs for apps that use @fishjam-cloud/video-effects.

react-native-webgpu 0.10.1

Second commit bumps react-native-webgpu from 0.5.15 to 0.10.1 in fishjam-chat and in the dev dependencies of react-native-custom-video-source and react-native-vision-camera-source (peer ranges unchanged). 0.10.1 fixes a leak in GPUExternalTexture.destroy() (wcandillon/react-native-webgpu#478): on 0.5.15 every WebGPU camera effect holds about one camera frame of graphics memory per frame until the JS garbage collector runs, a 200 MB to 1 GB saw-tooth on a Galaxy S23; on 0.10.1 it stays flat at about 145 MB. tsc passes for both packages and the example against the new version.

Note for apps on 0.8.4 or newer: GPUTextureUsage, GPUShaderStage and GPUBufferUsage imported from react-native-webgpu are undefined at import time (upstream evaluates them before its native install). Use the globals of the same name or plain numbers; @fishjam-cloud/video-effects 0.1.5 does the latter.

Documentation impact

  • Documentation update required
  • Documentation updated in another PR (camera effects docs in fishjam-cloud/documentation, FCE-3838)
  • No documentation update required

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)

react-native-webgpu uses AHardwareBuffer APIs from Android 8.0 (API 26), and Expo SDK 57 builds for API 24 by default, so a clean prebuild of the example failed to compile react-native-webgpu. Raise minSdkVersion with expo-build-properties, which the example already depends on.
0.10.1 releases the imported camera frame on GPUExternalTexture.destroy()
(wcandillon/react-native-webgpu#478). On 0.5.15 every WebGPU camera effect
leaks about one frame of graphics memory per frame on Android until the JS
garbage collector runs (200 MB to 1 GB saw-tooth on a Galaxy S23).
@MiloszFilimowski MiloszFilimowski changed the title Set Android minSdkVersion 26 in fishjam-chat Set Android minSdkVersion 26 and react-native-webgpu 0.10.1 in fishjam-chat Sep 16, 2026
@MiloszFilimowski
MiloszFilimowski merged commit f29c95f into main Sep 16, 2026
2 checks passed
@MiloszFilimowski
MiloszFilimowski deleted the fix/fishjam-chat-android-min-sdk branch September 16, 2026 09:54
MiloszFilimowski added a commit to fishjam-cloud/documentation that referenced this pull request Oct 1, 2026
## Description

The React Native docs now send users to camera effects on the camera
Fishjam already manages, instead of VisionCamera. VisionCamera stays as
an integration.

An effect is a camera track middleware. Peers keep receiving it as
`peer.cameraTrack`:

```ts
const blur = createCameraEffectMiddleware(createBackgroundBlurEffect(() => ({ segmentation, radius: 24 })));
setCameraTrackMiddleware(isBlurOn ? null : blur);
```

**Menu changes**
- **Tutorials:** new "Add background blur to your camera". "Draw WebGPU
effects into your published camera" is rewritten on
`createCameraFrameProcessorSession`, with no VisionCamera.
- **How-to → Camera effects (new):** overview, background effects (blur
and image), WebGPU effects, frame processing in a worklet, and stream
middleware (moved here, now covering React Native too).
- **How-to → Custom sources:** keeps non-camera content (web, React
Native, low-level frame API).
- **Integrations → Vision Camera (new):** the VisionCamera tutorial,
how-to, and WebGPU-on-VisionCamera guide, moved from the pages above.
- **Concepts:** new "How camera effects work". "How custom sources work"
links to it.
- **Redirects** for the four moved pages.

**Build and API reference**
- `web-client-sdk` submodule bumped to fff4e570 (web-client-sdk#606).
- New submodules `video-effects` (v0.1.5) and `react-native-worklets`
(v0.12.1), with TypeDoc pages.
- `typegpu` pinned to 0.12.4 (the version `video-effects` uses). The
VisionCamera WebGPU snippet maps `typegpu` to the SDK's 0.11 through
hidden Twoslash flags, so every snippet still type-checks.

## Tested

- All snippets type-check, `yarn build` passes with no broken links, and
the pre-commit checks (format, spellcheck, typecheck) pass.
- Ran the tutorial code end to end in a test app: iOS simulator (SimCam)
and Galaxy S23, debug and release builds, staging room. Blur, grayscale
+ watermark and the frame monitor work, and each device receives the
other's effect.

Testing found these, now fixed in the docs:
- Android needs `minSdkVersion: 26` (`react-native-webgpu`). The docs
add it with `expo-build-properties`.
- In Android release builds, `expo-asset` keeps bundled images as
drawable resources, so reading them with `File` fails. The docs include
a workaround, checked in a release build.
- `tgpu.resolve({ externals })` returns empty WGSL in TypeGPU 0.12. The
examples use the array form.

Performance on the Galaxy S23 (release build, 720x1280): blur runs at 30
fps with no dropped frames at about 110% CPU of 800% and 33% GPU; the
WebGPU tutorial effect at about 111% CPU and 12% GPU. Graphics memory
showed a 200 MB to 1 GB saw-tooth with any effect on
`react-native-webgpu` 0.5.15. The cause was in `react-native-webgpu`
(`GPUExternalTexture.destroy()` did not release the imported frame);
fixed upstream in wcandillon/react-native-webgpu#478, released in
0.10.1, memory flat at about 145 MB after it.

Fixes opened in our repos along the way:
- fishjam-cloud/video-effects#6: background images load on React Native
(released in 0.1.4)
- fishjam-cloud/video-effects#7: frames that skip `render()` no longer
hold GPU memory (released in 0.1.4)
- fishjam-cloud/video-effects#9: own WebGPU flag constants, because
`react-native-webgpu` 0.8.4 and newer export them as `undefined`
(released in 0.1.5). The WebGPU tutorial uses the `GPUTextureUsage` /
`GPUShaderStage` globals for the same reason.
- fishjam-cloud/web-client-sdk#610: fishjam-chat sets Android
`minSdkVersion` 26 and moves to `react-native-webgpu` 0.10.1

The docs require `@fishjam-cloud/react-native-client` 0.30.2 or newer,
`@fishjam-cloud/video-effects` 0.1.5 or newer and `react-native-webgpu`
0.10.1 or newer.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants