내용으로 건너뛰기

시작하기

터미널 창
bun add @capgo/capacitor-mute
bunx cap sync
import { Mute } from '@capgo/capacitor-mute';

장치 음소거 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');
}

MuteResponse

__MuteResponse__

음소거 상태 확인에서 응답.

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

플러그인에서 생성된 이 페이지는 src/definitions.ts. upstream에서 pubic API이 변경되었을 때 다시 동기화 하십시오.