nodepat
TypeScript icon, indicating that this package has built-in type declarations

0.6.1 • Public • Published

nodepat

npm cicd

nodepat is a NodeJS library that makes playing audio simple. nodepat uses FFmpeg to provide robust support for virtually any audio format and SDL2 to play back audio.

Prerequisites

Install Prerequisites before installing.

Install

npm install nodepat

Example

import nodepat from 'nodepat';

// Alternatively
import { play, skip, pause, resume } from 'nodepat';

(async () => {
  // Play a file
  await nodepat.play('amerika.mpga');

  // Skip the current file
  await nodepat.skip();

  // Pause audio playback
  await nodepat.pause();

  // Resume audio playback
  await nodepat.resume();
})();

Readme

Keywords

none

Package Sidebar

Install

npm i nodepat

Weekly Downloads

1

Version

0.6.1

License

LGPL-2.0

Unpacked Size

98.6 kB

Total Files

26

Last publish

Collaborators

  • tnewman