1.2.8 • Published 3 years ago

@dongido/wave v1.2.8

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

This is a fork for Wave.js.

in this fork, I will try to add the fixes suggested by contributors to the original code which has been ignored for a while now

Audio visualizer library for javascript (20+ designs).

DOCUMENTATION

LIVE EXAMPLES

Installation

<script src="https://cdn.jsdelivr.net/gh/foobar404/wave.js/dist/bundle.iife.js"></script>
npm i @foobar404/wave

Setup

import Wave from "@foobar404/wave"
var wave = new Wave();
let [wave] = useState(new Wave());

Usage

wave.fromElement("audio_element_id","canvas_id",{type:"wave"});

Documentation

<html>

<head></head>

<body>

   <canvas id="output" height="500" width="500"></canvas>

   <script src="https://cdn.jsdelivr.net/gh/foobar404/wave.js/dist/bundle.iife.js"></script>
   <script>
      let wave = new Wave();

      navigator.mediaDevices.getUserMedia({
            audio: true
         })
         .then(function (stream) {
            wave.fromStream(stream, "output", {
               type: "shine",
               colors: ["red", "white", "blue"]
            });
         })
         .catch(function (err) {
            console.log(err.message)
         });
   </script>
</body>

</html>

Contributor Workflow