New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

wavesurfer-peakbuilder

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

wavesurfer-peakbuilder

This package prebuilds peaks for [wavesurfer.js](https://wavesurfer-js.org/).

latest
npmnpm
Version
1.0.3
Version published
Maintainers
1
Created
Source

wavesurfer-peakbuilder

This package prebuilds peaks for wavesurfer.js.

By default, wavesurfer must use XHR to download an audio fully before it can draw peaks. Wavesurfer accepts an optional array of precalculated peaks and will use these instead of downloading the complete audio file if the array is supposed. The audiowaveform tool can be used to build peaks, but its output is not compatible with wavesurfer. This package solves everything by using audiowaveform to build peaks and output them in a wavesurfer-compatible array.

For a more practical example that uses this package, see gulp-wavesurfer-peakbuilder.

yarn add wavesurfer-peakbuilder --dev

Usage

wavesurfer-peakbuilder requires local access to the audio file. This is necessary so it can prebuild peaks.

import peakbuilder from 'wavesurfer-peakbuilder'

peakbuilder('./path/to/audio.mp3').resolve( (peaks) => {
  console.log(peaks);
}).reject((err)=>{
  console.log(err);
});

FAQs

Package last updated on 17 Jun 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts