0.2.3 • Published 7 years ago

waveform-react v0.2.3

Weekly downloads
76
License
MIT
Repository
github
Last release
7 years ago

waveform-react

draw audio waveforms with react

example

https://ruebel.github.io/waveform-react

installation

npm install waveform-react

usage

import Waveform from 'waveform-react';

class MyComponent extends React.Component {
  render() {
    return (
      <Waveform
        // Audio buffer
        buffer={this.state.buffer}
        // waveform height
        height: 150,
        markerStyle={{
          // Position marker color
          color: '#fff',
          // Position marker width (in pixels)
          width: 4
        }}
        // Optionally handle user manually changing position (0 - 1)
        onPositionChange={pos => console.log(pos)}
        // Marker position on waveform (0 - 1)
        position={0.5}
        // redraw waveform on window size change (default: true)
        responsive={false}
        // Show position marker
        showPosition={true}
        waveStyle={{
          // animate waveform on draw (default: true)
          animate: true,
          // waveform color
          color: '#000',
          // width of each rendered point (min: 1, max: 10)
          pointWidth: 1
        }}
        // waveform width
        width: 900
      />
    );
  }
}

license

MIT © Randy Uebel

0.2.3

7 years ago

0.2.2

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago