メインコンテンツにスキップ
プラグインに戻る
@capgo/capacitor-mute
チュートリアル
@capgo/capacitor-mute

ミュート

iOS デバイスのミュート スイッチ状態を検出して、適切な音再生を実行する

ガイド

Muteのチュートリアル

デバイスでテスト

Download the Capgo app, then scan the QR code.

ミュート プラグイン プレビュー QR code

使用中:@capgo/capacitor-mute

Capacitor デバイスミュートステータスを検出するためのミュート プラグイン

インストール

bun add @capgo/capacitor-mute
bunx cap sync

このプラグインが公開するもの

  • isMuted - デバイスミュートSwitchが有効かどうかを確認します。

使用例

isMuted

デバイスミュートSwitchが有効かどうかを確認します。

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');
}

フル リファレンス

capgo/capacitorの使用を続けてください

Capgoを使用している場合 capgo/capacitorを使用して APIの計画と操作を実行するには、@API/__CAPGO_KEEP_1__-muteと接続してください Capgoの実装詳細については、@capgo/capacitor-muteを参照してください for the implementation detail in @capgo/capacitor-mute, Getting Startedの実装詳細については、 __CAPGO_KEEP_0__ Overview API Overviewの実装詳細については、 for the implementation detail in API Overview, Docs for the implementation detail in Introduction, and API Keys for the implementation detail in API Keys.