@nesorter/lib
TypeScript icon, indicating that this package has built-in type declarations

1.0.18 • Public • Published

@nesorter/lib

Standalone solution for audio streaming

Set of utils for audio streaming

Usage example

import { Streamer, FileSystemScanner, Queue } from '@nesorter/lib';

// with this options webradio should be available
// on 'http://localhost:3000/listen'
const streamer = new Streamer(3000, '/listen');

// sets root path for scanning audio library
const scanner = new FileSystemScanner('/home/user/music');

// create play queue
const queue = new Queue(streamer);

// compose all: scan-audio-lib -> add-to-queue -> start-queue
scanner.scan()
  .then((items) => items.map((item) => queue.add(item.fullPath)))
  .then(() => queue.startQueue());

Package Sidebar

Install

npm i @nesorter/lib

Weekly Downloads

14

Version

1.0.18

License

MIT

Unpacked Size

22.1 kB

Total Files

23

Last publish

Collaborators

  • kugichka