Choose an example
Choose the SDK used by your app, then follow the setup for that example. Clone the complete repository: framework examples can depend on their parent package, workspace configuration, or shared setup scripts.
| SDK | Example | What to evaluate |
|---|---|---|
| Flutter | Package example app | Preview lifecycle, beauty, Cloud Filters, backgrounds, capture, and recording |
| Native Android | Camera and WebRTC example | App-owned camera capture, effects, and processed video sent to a browser viewer |
| Native iOS | Camera and WebRTC example | Native camera preview, effects, and processed frames sent to a browser viewer |
| React Native | Package example app | Fabric preview, effects, beauty, Cloud Filters, media, and lifecycle |
| Web, vanilla TypeScript | Web 1.0.0 quickstart | Complete HTML and TypeScript for camera start/stop, licence status, and local effect loading |
| Web, React | React example source | The React preview component, beauty controls, and a local .nosmai effect; use the version-pinned setup below |
Native SDK binaries are distributed separately from these example apps. Follow Android installation or iOS installation for the current artifacts.
Run the React Web example with SDK 1.0.0
Complete the browser requirements in Web installation. The repository examples use a relative SDK dependency. The following setup selects the published 1.0.0 package and copies that package's matching runtime assets.
Clone the source and install the SDK in the React example directory:
git clone --depth 1 https://github.com/nosmai/nosmai_effects_sdk_web.git cd nosmai_effects_sdk_web/examples/react npm install --save-exact @nosmai/[email protected]
This command also installs the example's other declared dependencies. In this same directory, create prepare-nosmai-assets.mjs using the script in Copy the runtime assets. Then configure the example to use that script:
npm pkg set "scripts.prepare:assets=node prepare-nosmai-assets.mjs" npm run dev
Keep the script inside the selected example directory so it resolves that example's installed npm package. It copies engine/, engine-baseline/, and models/ from the installed 1.0.0 package into public/nosmai.
Open the URL printed by Vite, normally http://localhost:5181. Enter a Web licence key registered for that origin, start the preview, and allow camera access. Use a licensed Web-compatible .nosmai file to evaluate a local effect. The camera preview can be evaluated before selecting an effect file.
Confirm the package version and production build with:
npm ls @nosmai/web-sdk npm run build
The dependency should resolve to @nosmai/[email protected]. A successful build checks bundling and TypeScript; verify the actual camera, permissions, licence status, and selected effects in your target browser too.
For a framework-free app, use the vanilla TypeScript quickstart. The repository's separate Vanilla demo currently requires API alignment before it builds with published SDK 1.0.0.
Mobile example setup
Flutter
Clone the Flutter SDK repository and run from its example directory:
flutter pub get flutter run --dart-define=NOSMAI_ANDROID_LICENSE_KEY=YOUR_ANDROID_KEY --dart-define=NOSMAI_IOS_LICENSE_KEY=YOUR_IOS_KEY
Only the active platform's key is used. The example depends on the parent plugin. Flutter package 2.0.2 resolves native SDK 3.0.7 through its declared Android and CocoaPods dependencies. Use the Flutter installation guide for the current native requirements and resolution steps.
React Native
Clone the React Native repository and install its workspace dependencies from the repository root using the Yarn version declared in package.json:
yarn install yarn example start
In another terminal, use yarn example android or yarn example ios after completing the native setup. Follow React Native installation and the repository's development instructions for artifact placement and workspace commands. Register the example's final application ID or bundle identifier for its licence key.
Native Android and iOS
The linked native apps include a WebRTC peer and browser viewer. Their READMEs cover signalling, optional local effects, and platform-specific build steps. Use the current installation guides to align the SDK before building:
- Android
3.0.7: use the verified release AAR. The WebRTC app expects it atapp/libs/nosmai-release.aar. Set the host application's minimum SDK to at least API24; this sample currently selectsarm64-v8a. - iOS
3.0.7: pinNosmaiCameraSDKto3.0.7in the sample's Podfile, then follow its project-generation, CocoaPods, and signing instructions. Use a physical arm64 iPhone or iPad.
The SDK-wide OS and ABI requirements are listed in Platform support. Some sample READMEs still refer to older native releases; use the current installation guides for SDK versions and downloads.
Live-streaming examples and guides
| Provider | SDK | Source or guide |
|---|---|---|
| Agora | Flutter | Bridge example app and integration guide |
| LiveKit | Flutter | Bridge example app and integration guide |
| LiveKit | Native Android | Native Android example |
| LiveKit | Native iOS | Native iOS example |
| Raw WebRTC | Native Android | Native Android example |
| Raw WebRTC | Native iOS | Native iOS example |
| Agora | Web | Custom-track example source |
| LiveKit | Web | Publish-and-receive example source |
| Raw WebRTC | Web | Processed video-track integration guide |
Provider configuration is additional to the Nosmai licence:
- Agora examples need an Agora App ID and the channel/token configuration described by the selected example.
- LiveKit examples need a server URL and participant token. The Web loopback example uses local
livekit-serverandlktools to prepare its test room. - Native WebRTC examples need the included Node signalling/viewer server and a reachable address shared by the phone and computer.
For the Web Agora or LiveKit source examples, repeat the published SDK and asset-script setup above inside examples/agora or examples/livekit, then follow that directory's README. Agora's local setup uses an ignored .env.agora.local for its App ID and certificate and generates test tokens server-side. Keep the certificate out of browser-exposed configuration.
Web streaming uses sdk.output.videoTrack() or sdk.output.stream(). Pair acquisitions with sdk.output.release() after unpublishing. Add microphone tracks through your streaming provider; Nosmai's processed output is video only.
Verify an evaluation
- Register the exact application ID, bundle identifier, or Web origin and supply the matching Nosmai key.
- Confirm the camera preview works before adding an effect or connecting a call.
- Check that the key grants the features and assets you intend to evaluate.
- Apply your chosen compatible effect and confirm it appears in the preview.
- For streaming, confirm the remote participant receives the processed image.
- Stop capture or leave the screen and confirm the camera is released.
Use supported physical devices for native camera tests. On Web, test the browsers, camera permissions, resolution, and devices your app will support. Sample controls and source code are separate from access to licensed assets.
Next steps
- Choose a quickstart
- Create a licence key
- Review platform support
- Choose a live-streaming integration
- Troubleshoot a sample