パッケージの詳細

@capgo/capacitor-mute

Cap-go12.7kMPL-2.07.3.16

Detect if the mute switch is enabled/disabled on a device

capacitor, plugin, native, mute

readme

capacitor-mute

Capgo - Instant updates for capacitor

Detect if the mute switch is enabled/disabled on a device

Documentation

The most complete doc is available here: https://capgo.app/docs/plugins/mute/

Install

npm install @capgo/capacitor-mute
npx cap sync

Know issue

On IOS with Xcode 14 the lib use under the hood Mute is not configured as Apple expect anymore, it's not the only one having the issue as you can see here : https://github.com/CocoaPods/CocoaPods/issues/8891

Solution: Replace this to your Podfile:

post_install do |installer|
  assertDeploymentTarget(installer)
end

By

post_install do |installer|
  assertDeploymentTarget(installer)
  installer.pods_project.targets.each do |target|
    if target.respond_to?(:product_type) and target.product_type == "com.apple.product-type.bundle"
      target.build_configurations.each do |config|
          config.build_settings['CODE_SIGNING_ALLOWED'] = 'NO'
      end
    end
  end
end

That should solve your issue. I did open issue in the original repo to see if they can fix it: https://github.com/akramhussein/Mute/issues/16 If no answer I will add the code directly to capacitor-mute

API

<docgen-index>

</docgen-index>

<docgen-api>

Capacitor Mute Plugin for detecting device mute status.

isMuted()

isMuted() => Promise<MuteResponse>

Check if the device mute switch is enabled.

Returns: Promise<MuteResponse>

Since: 1.0.0


getPluginVersion()

getPluginVersion() => Promise<{ version: string; }>

Get the native Capacitor plugin version.

Returns: Promise<{ version: string; }>

Since: 1.0.0


Interfaces

MuteResponse

Response from mute status check.

Prop Type Description
value boolean True if device is muted, false otherwise

</docgen-api>

更新履歴