Skip to content

Installation ​

sh
bun add @corewire/devices

Add @corewire/audio-source only when your process streams audio to a device itself:

sh
bun add @corewire/audio-source

npm install and pnpm add work too. For a protocol without the device layer, install @corewire/airplay, @corewire/companion-link or @corewire/core directly. @corewire/devices already depends on all three.

Requirements ​

  • Node.js 18.17 or later (20.3 or later on the 20 line), or Bun. Every package declares this in engines. The packages use node:net, node:dgram, node:crypto and node:events, so they do not run in a browser.
  • The process must reach the devices on the local network. That means TCP to the AirPlay and Companion Link ports, UDP 5353 for mDNS, and UDP for audio streams and timing.
  • FfmpegSource needs ffmpeg on the PATH. The other sources decode in WebAssembly or plain TypeScript.

The packages ship as ES modules with type declarations. There is no CommonJS build.

One version ​

One GitHub release publishes every package under the same version. Upgrade them together. Mixing versions of devices and the protocol packages is not supported.

Entry points ​

ImportContents
@corewire/devicesAppleTV, HomePod, discover, createDevice, Credentials, Pairing, every error class, device models
@corewire/devices/catalogfetchLyrics, fetchAnimatedArtwork, CatalogError
@corewire/airplayconnect, pair, discover, AirPlaySession, channels, URL playback, audio streams, timing
@corewire/airplay/mrpMediaRemote, MediaRemoteState, keys, commands, volume, keyboard, message codec, protobuf types
@corewire/airplay/raopconnect, discover, RaopSession and the TXT record helpers
@corewire/airplay/rtspRtspClient, request and response parsing
@corewire/companion-linkconnect, pair, discover, CompanionLinkSession and its groups
@corewire/audio-sourceMp3Source, OggSource, WavSource, PcmSource, FileSource, UrlSource, FfmpegSource, LiveSource, SineWaveSource
@corewire/coreErrors, Logger, reporter and waitFor
@corewire/core/crypto, /discovery, /encoding, /pairing, /transportThe shared building blocks

CoreWire is released under the MIT license.