Giter VIP home page Giter VIP logo

wave.js's Introduction

This is an opinionated fork of Wave.js

I have no intent of upstreaming this, though if you see anything you like I'm happy to make a proper PR from a clean fork.

From original README

Audio visualizer library for javascript (20+ designs).

DOCUMENTATION

LIVE EXAMPLES

Installation

Install With CDN

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

Or NPM

npm i @foobar404/wave

Setup

If your using npm use a default import to include wave.

import Wave from "@foobar404/wave"

Create a new wave object.

var wave = new Wave();

If your working with React, put the wave instance in state.

let [wave] = useState(new Wave());

Usage

Call one of the three main function on the wave object, fromFile, fromStream, fromElement.

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

Documentation

View the current documentation for Wave.js here.

Example

<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. Fork Wave.js repo.
  2. Clone to your local computer.
  3. Run "npm i" in the root folder to install dependencies.
  4. Run "npm run test" to start the dev server and code watcher.
  5. Open the src folder and make a change to one of the src files.
  6. Save changes and refresh browser window to see changes.
  7. Push to remote branch and create a pull request to the Wave.js master branch.

wave.js's People

Contributors

foobar404 avatar doesdev avatar b-stud avatar mrvwman avatar zeusthedev avatar dependabot[bot] avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.