Skip to content
This repository has been archived by the owner on Sep 4, 2023. It is now read-only.

YXL76/neon-rodio

Repository files navigation

neon-rodio

Rodio for Node.js

neon-rodio allows you to play music files using javascript

Installation

npm install neon-rodio
yarn add neon-rodio

Usage

const NeonRodio = require("../../neon-rodio");

const player = new NeonRodio();

player.load("path/to/test.wav");

APIs

.empty(): boolean;                // check if playback is empty
.load(url: string): boolean;      // load music file (return true if loading succeeded)
.pause(): void;                   // pause playback
.play(): boolean;                 // resume playback (return true if playback doesn't end)
.volume(level: number): void;     // set player volume (0-100)
.stop(): void;                    // stop playback