npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@apirtc/expo-apirtc-options-plugin

v0.0.11

Published

Expo Plugin to add apiRTC features in a React Native application

Readme

expo-apirtc-options-plugin

Plugin to add apiRTC features in React Native application using Expo. This plugin simplifies the integration of the following features:

  • Screen sharing for Android and iOS
  • Background blur and background image replacement for Android (via ML Kit Selfie Segmentation)

Installation

npm install @apirtc/expo-apirtc-options-plugin

Usage in app.json

Declare the plugin in your app.json:

{
  "expo": {
    "plugins": [
      ["@apirtc/expo-apirtc-options-plugin", {
        "enableMediaProjectionService": true,
        "enableVideoEffects": true,
        "appleTeamId": "YOUR_TEAM_ID"
      }]
    ]
  }
}

Options

| Parameter | Description | Default | | --- | --- | --- | | enableMediaProjectionService | Enable screen sharing on Android (MediaProjection service) | true | | enableVideoEffects | Enable background blur and background image replacement on Android | true | | appleTeamId | Apple Team ID used for the iOS broadcast extension | "APPLE_TEAM_ID_NOT_SET" | | logLevel | Plugin log verbosity: "silent", "error", "warn", "info", "debug" | "warn" |

What does this plugin do?

Android

  • Adds required permissions to AndroidManifest.xml for screen sharing and camera access
  • Registers AppLifecyclePackage to handle app lifecycle events (e.g. releasing streams when the app is killed)
  • When enableVideoEffects: true:
    • Copies native Kotlin files (BackgroundBlurModule, BlurVideoProcessor, BackgroundImageProcessor, BackgroundBlurPackage) to the Android source tree
    • Registers BackgroundBlurPackage in MainApplication.kt
    • Adds com.google.mlkit:segmentation-selfie:16.0.0-beta6 to app/build.gradle

iOS

  • Adds a broadcast extension for screen sharing
  • Configures the project with all modifications needed for screen sharing

Using video effects from JavaScript (Android only)

After enabling enableVideoEffects: true, the BackgroundBlurModule native module is available:

import { NativeModules, Platform } from 'react-native';
const { BackgroundBlurModule } = NativeModules;

// Enable background blur
if (Platform.OS === 'android') {
  await BackgroundBlurModule.enableBlur({
    trackId: videoTrack.id,        // video track ID from the local stream
    strong: false,                 // true for stronger blur (3 passes)
  });
}

// Enable background image replacement
if (Platform.OS === 'android') {
  await BackgroundBlurModule.enableBackgroundImage({
    trackId: videoTrack.id,
    imageUrl: 'https://example.com/background.jpg',
  });
}

// Disable any active video effect
if (Platform.OS === 'android') {
  await BackgroundBlurModule.disableBlur();
}

// Check if an effect is active
if (Platform.OS === 'android') {
  const isActive = await BackgroundBlurModule.isBlurEnabled();
}

Notes

  • enableVideoEffects is Android-only. The option is silently ignored on iOS.
  • ML Kit Selfie Segmentation (16.0.0-beta6) is currently in beta — there is no GA release of this library.
  • Background effects are applied via WebRTC's VideoProcessor API, so both the local preview and remote peers see the processed video.
  • For persistence across sessions, save the selected effect ID with AsyncStorage and re-apply it after createStreamFromUserMedia().

Contributing

Contributions are welcome! Feel free to open an issue or submit a pull request on GitHub.

This plugin is maintained by Apizee.