javascript - Cross fade two instances of wavesurfer.js webaudio with react.js -
i'm looking find way crossfade audio between 2 instances of wavesurfer.js in react.
i have container component passes mp3 path down wavesurfer instance i'm looking control both sources same audiocontext in container component (i think?).
i've looked https://www.npmjs.com/package/crossfade not sure how source node each wave instance , pass parent component?
basic setup:
<container> <wave song="" /> <wave song="" /> <input type="range" ref="xfade"> </container>
then have components setup this...
this.wavesurfer = object.create(wavesurfer); this.wavesurfer.init({ container: this.refs.wave }); this.wavesurfer.load(this.props.song);
sorry basic code info have else functioning , i'm looking info on functionality please.
Comments
Post a Comment