メインコンテンツにスキップ

はじめに

ターミナル画面
bun add @capgo/capacitor-mute
bunx cap sync
import { Mute } from '@capgo/capacitor-mute';

デバイスのミュートスイッチが有効になっているかどうかを確認します。

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

ミュートステータスの確認結果

export interface MuteResponse {
/** True if device is muted, false otherwise */
value: boolean;
}

このページはプラグインの src/definitions.tsパブリック API がアップストリームで変更された場合に再度同期を実行してください。