1.0.0 • Published 6 years ago

react-wavecanvas v1.0.0

Weekly downloads
8
License
MIT
Repository
github
Last release
6 years ago

react-wavecanvas

NPM JavaScript Style Guide

This project is a library for visualizing music using React.js.

Install & Example

Install

yarn install react-wavecanvas

Example

> cd example && yarn start

Get Started

import React, { Component } from "react";

import WaveCanvas from "react-wavecanvas";

export default class App extends Component {
  render() {
    return (
      <div>
        <WaveCanvas
          url="http://localhost:3000/sample.mp3"
          color={"blue"} // text or rgb format (ex. rgb(0, 0, 0)
          width={500}
          height={200}
          isCursorShow={true}
        />
      </div>
    );
  }
}

Props

KeyValue
urlAudio Resource URL (mp3 and wav).Other formats conform to use of WebAudio
colortext format or rgb format. ex.) blue red rgb(0,0,0)
widthWidth of canvas element.
heightHeight of canvas element.
isCursorShowSeek cursor visibllity turn on/off.

License

MIT © HaraKeisuke