Skip to main content
@capgo/capacitor-mute Device APIs Open source

Mute Capacitor plugin

Detect device mute switch state for iOS devices to handle audio playback appropriately

Install

bun add @capgo/capacitor-mute bunx cap sync
npm, pnpm or yarn
  • npm install @capgo/capacitor-mute
  • pnpm add @capgo/capacitor-mute
  • yarn add @capgo/capacitor-mute

Guide

How to use Mute in Capacitor

Test on device

Download the Capgo app, then scan the QR code.

Mute plugin preview QR code

Using @capgo/capacitor-mute

Capacitor Mute Plugin for detecting device mute status.

Install

bun add @capgo/capacitor-mute
bunx cap sync

bunx cap sync copies the plugin's native code into your native projects. Run it again after every plugin upgrade.

Import

import { Mute } from '@capgo/capacitor-mute';

API at a glance

Method Description
isMuted Check if the device mute switch is enabled.

Examples

isMuted()

Check if the device mute switch is enabled.

import { Mute } from '@capgo/capacitor-mute';

const { value } = await Mute.isMuted();
if (value) {
  console.log('Device is muted');
} else {
  console.log('Device is not muted');
}

Full reference

Keep going from Using @capgo/capacitor-mute

If you are using Using @capgo/capacitor-mute to plan dashboard and API operations, connect it with @capgo/capacitor-mute for the implementation detail in @capgo/capacitor-mute, Getting Started for the implementation detail in Getting Started, API Overview for the implementation detail in API Overview, Introduction for the implementation detail in Introduction, and API Keys for the implementation detail in API Keys.

FAQ

Mute plugin FAQ

How do I install the Mute plugin in a Capacitor app?

Run "bun add @capgo/capacitor-mute" (or "npm install @capgo/capacitor-mute"), then run "bunx cap sync" so the iOS and Android projects pick up the native code. Import it from "@capgo/capacitor-mute" in your app code.

Does @capgo/capacitor-mute work with React, Vue and Angular?

Yes. Mute is a Capacitor package, so it works with any web framework that runs inside Capacitor, including Ionic, React, Vue, Angular, Svelte and plain JavaScript.

Which Capacitor version does @capgo/capacitor-mute support?

Capgo plugins follow Capacitor's major version: use the plugin major version that matches your Capacitor major version (for example plugin v8 with Capacitor 8). The compatibility table in the GitHub README lists the maintained versions.

Is @capgo/capacitor-mute free and open source?

Yes. The source code is public on GitHub at https://github.com/Cap-go/capacitor-mute/ and the package is free to install from npm. Bug reports and pull requests are welcome.

Can I update code that uses Mute without an App Store review?

Installing or upgrading the plugin changes native code, so it needs a new store build. After that, JavaScript, HTML and CSS changes that call the plugin can ship instantly with Capgo live updates.

Ship Mute changes without waiting for app review

Once the plugin is in your store build, Capgo live updates push your JavaScript, HTML and CSS changes to users in minutes.

Start with Capgo