跳过内容

入门指南

终端窗口
bun add @capgo/capacitor-mute
bunx cap sync

导入

导入
import { Mute } from '@capgo/capacitor-mute';

API概述

API概述

检查设备静音开关是否启用

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_KEEP_2__

MuteResponse

__CAPGO_KEEP_3__

响应静音状态检查。

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

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