1.5.1 • Published 3 years ago

soundamplitude v1.5.1

Weekly downloads
-
License
ISC
Repository
bitbucket
Last release
3 years ago

Sound Amplitude

Demo

https://youtu.be/8SMhPq5m8fQ

cool

Installation

npm install soundamplitude

ES6

import Soundamplitude from "./node_module/soundamplitude/soundamplitude.js"

Initalize object

var options = {} options.fps = 50 // control how frequent the callback return

var url = "https://www.xxx.com/xxx.mp3"

var soundamplitude = new Soundamplitude(url,options)

play / stop (please make sure you must start play by a click event)

soundamplitude.play()

Call back to get amplitude

soundamplitude.on("amplitude",e=>{

console.log(e.amplitude) })

Callback when ended

soundamplitude.on("ended",()=>{

})

change volume

0< volume <1

soundamplitude.changevolume(volume)

Release

soundamplitude.release()

1.2.0

3 years ago

1.1.0

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.0

3 years ago

1.3.0

3 years ago

1.0.0

3 years ago