1.2.8 • Published 5 years ago
@dongido/wave v1.2.8
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).
Installation
<script src="https://cdn.jsdelivr.net/gh/foobar404/wave.js/dist/bundle.iife.js"></script>npm i @foobar404/waveSetup
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
1.2.8
5 years ago