@lox-audioserver/node-googlecast
v0.1.1
Published
TypeScript Google Cast (Chromecast) discovery and control library
Readme
@lox-audioserver/node-googlecast
TypeScript Google Cast (Chromecast) discovery and control library for Node 20+.
Features
- mDNS discovery for
_googlecast._tcp.local - Cast V2 TLS transport with framing and protobuf messages
- Receiver, media, and volume controllers
- Typed events and extensible namespace controllers
Install
npm install @lox-audioserver/node-googlecastAPI
discoverChromecasts(options)returns a handle withdevicesandstop()connect(device, options)returns aCastDevice
CastDevice
receiver,media,volumecontrollerson('receiverStatus' | 'castStatus' | 'mediaStatus' | 'mediaStatusModel' | 'volumeChanged' | 'connected' | 'disconnected' | 'connectionState')addController(controller)for custom namespaceslaunchApp(appId, timeoutMs?)to start a custom Cast app sessionaddAppController(namespace, factory)to bind a controller to the app transportIdgetCastStatus()andgetMediaStatusModel()for convenience models
ReceiverController
getStatus(),getCastStatus(),getSessions(),getAppAvailability(appId|appIds),getVolume()
MediaController
playMedia()convenience wrapper for metadata/subtitles/queueingplayCurrent(),pauseCurrent(),stopCurrent(),seekCurrent()helpers using cached session
