Overview
index.mdx
What the package provides and how to get started.
Use @ddgutierrezc/legato-capacitor when you need Capacitor runtime integration for audio playback on iOS and Android.
For package-line support and peer dependency compatibility, use the public Compatibility and Support Matrix.
A Capacitor plugin that exposes Legato playback APIs to web and hybrid JavaScript runtimes. It provides:
legato native doctor/configure commands for repo-owned Capacitor groundwork checks.| Export | Purpose |
|---|---|
audioPlayer | Playback commands, queue operations, read-model queries, and player events. |
mediaSession | Remote control event listeners. |
Legato | Unified facade combining audioPlayer and mediaSession surfaces with a single event listener. See Legato Facade. |
import { audioPlayer, mediaSession, Legato } from '@ddgutierrezc/legato-capacitor';import { AUDIO_PLAYER_EVENTS, MEDIA_SESSION_EVENTS, LEGATO_EVENTS, addAudioPlayerListener, addMediaSessionListener, addLegatoListener, onPlaybackStateChanged, onPlaybackActiveTrackChanged, onPlaybackQueueChanged, onPlaybackProgress, onPlaybackEnded, onPlaybackError, onRemotePlay, onRemotePause, onRemoteNext, onRemotePrevious, onRemoteSeek,} from '@ddgutierrezc/legato-capacitor';import { createLegatoSync, createAudioPlayerSync } from '@ddgutierrezc/legato-capacitor';This package is documented in three sections following Diátaxis methodology:
Overview
index.mdx
What the package provides and how to get started.
Explanation
explanation/
Conceptual guidance for capabilities, snapshots, and runtime interpretation.
Reference
reference/
Detailed API reference for every exported method, type, and event.
How-to
how-to/
Task-oriented guides for common integration patterns.
Start with Capability Projection and Snapshot Semantics for the mental model, then apply it in Build Capability-Driven Controls and Send Secure Track Headers. Use Native CLI when working on repository-native setup checks.