Skip to content

API Reference

This section provides complete API documentation for all exported members of @ddgutierrezc/legato-capacitor.

PageDescription
Audio PlayerAudioPlayerApi — playback commands, queue operations, state queries, and player event listeners.
Media SessionMediaSessionApi — remote control event listeners and subscription helpers.
Legato FacadeLegato — unified facade combining audioPlayer and mediaSession surfaces with a single event listener.
SnapshotsPlaybackSnapshot, QueueSnapshot, and BindingCapabilitiesSnapshot — shapes, sources, and usage.
EventsEvent-name constants, payload types, and shortcut listener helpers.
ErrorsLegatoError interface and error code constants.
SyncSync controller factories for local snapshot mirroring.
Native CLIPublic legato native commands for doctor and safe native configure flows.
// Playback commands and queries
const player = audioPlayer;
// Remote control listeners
const remote = mediaSession;
// Unified facade
const legato = Legato;

The following types are re-exported from @ddgutierrezc/legato-contract:

  • Track — queue item shape
  • PlaybackState — 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