Zum Inhalt springen

Einstieg

Terminal-Fenster
bun add @capgo/capacitor-mute
bunx cap sync
import { Mute } from '@capgo/capacitor-mute';

Überprüfen, ob der Lautstärkeregler aktiviert ist.

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

Antwort aus Mute-Status-Überprüfung.

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

Diese Seite wird aus dem Plugin generiert. src/definitions.tsRe-run the sync when the public API changes upstream.