1.0.0 • Published 3 years ago
@janakj/pulseaudio.js v1.0.0
Pulseaudio.js
Pulseaudio.js is a fully-featured JavaScript (TypeScript) client library for PulseAudio, the sound system used by modern Linux distributions. The client can be used to configure and control the PulseAudio server, play or record audio, and much more. The library is entirely implemented in TypeScript and has no external dependencies. It communicates with the server using the PulseAudio native protocol over a UNIX domain socket.
The library requires PulseAudio 10.0 or higher (PulseAudio native protocol version 32 or higher).
Pulseaudio.js is free software licensed under the ISC license.
Main Features
- Asynchronous Promise-based API with TypeScript type declarations
- Low-latency audio playback and recording integrated with the Node.js stream API
- PulseAudio source, sink, and stream introspection and volume control
- Sample cache management & playback
- Module loading & unloading on the PulseAudio server (can be used to create virtual sources and sinks)
- Support for asynchronous event notifications sent by the PulseAudio server
Installation & Basic Usage
npm install @janakj/pulseaudio.js
import { PulseAudio } from '@janakj/pulseaudio.js';
const pa = new PulseAudio();
(async function() {
await pa.connect();
console.log(await pa.getServerInfo());
await pa.disconnect();
}());
Documentation
Please refer to the wiki for documentation and usage examples.
1.0.0
3 years ago