跳过内容

开始使用

终端窗口
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');
}

类型参考

类型参考

MuteResponse

静音响应

静音状态检查的响应

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

真实来源

真实来源

本页面由插件生成。 src/definitions.ts当公共API上游更改时,请重新运行同步。