audio.AudioInterruption
The system interrupting the app's audio (a call, an alarm), and the interruption ending.
Utilisation
Show when a phone call interrupts audio.
// Show when a phone call interrupts audio.
import { Text, audio, signal, type AudioInterruption } from 'kuito';
export function AudioStatus() {
const interruption = signal<AudioInterruption | null>(null);
audio.watch('interruption', (event) => {
interruption.value = event;
});
return <Text>{interruption.value ? JSON.stringify(interruption.value) : 'No interruption'}</Text>;
}Déclaration du type
export type AudioInterruption = Interruption;Membres 2
| Nom | Type | Requis | Description |
|---|---|---|---|
type | AudioInterruptionType | Oui | — |
shouldResume | boolean | Oui | On ended: the system suggests resuming. |
Généré depuis les déclarations TypeScript publiques : signatures, props et valeurs par défaut viennent de la source vérifiée, les descriptions de sa JSDoc. Aucune valeur par défaut n'est inventée.