API Reference
This section provides complete API documentation for all exported members of @ddgutierrezc/legato-capacitor.
Reference pages
Section titled “Reference pages”| Page | Description |
|---|---|
| Audio Player | AudioPlayerApi — playback commands, queue operations, state queries, and player event listeners. |
| Media Session | MediaSessionApi — remote control event listeners and subscription helpers. |
| Legato Facade | Legato — unified facade combining audioPlayer and mediaSession surfaces with a single event listener. |
| Snapshots | PlaybackSnapshot, QueueSnapshot, and BindingCapabilitiesSnapshot — shapes, sources, and usage. |
| Events | Event-name constants, payload types, and shortcut listener helpers. |
| Errors | LegatoError interface and error code constants. |
| Sync | Sync controller factories for local snapshot mirroring. |
| Native CLI | Public legato native commands for doctor and safe native configure flows. |
Quick reference
Section titled “Quick reference”Namespaces
Section titled “Namespaces”// Playback commands and queriesconst player = audioPlayer;
// Remote control listenersconst remote = mediaSession;
// Unified facadeconst legato = Legato;Types re-exported from contract
Section titled “Types re-exported from contract”The following types are re-exported from @ddgutierrezc/legato-contract:
Track— queue item shapePlaybackState— playback state literals (idle,loading,ready,playing,paused,buffering,ended,error)PlaybackSnapshot— full playback projection (see Snapshots)QueueSnapshot— queue projection (see Snapshots)BindingCapabilitiesSnapshot— runtime capability snapshot (see Snapshots)LegatoError— error payload