foobar404 / wave.js

Audio visualizer library for javascript. Create dynamic animations that react to an audio file or audio stream.

Home Page:https://foobar404.github.io/wave.js/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

fromStream() Doesn't Visualize Due To self.visualize() Being Called Without the Frame Parameter

rynstwrt opened this issue · comments

commented

In the renderFrame() function inside of the fromStream(stream, canvas_id, options = {}) function, self.visualize() is being called without the frame parameter, and results in frame being undefined inside of the visualize function.

Simply changing the line that goes:
self.visualize(self.current_stream.data, self.current_stream.id, self.current_stream.options);

to instead be:
self.visualize(self.current_stream.data, self.current_stream.id, self.current_stream.options, 1);

I don't know if there's more to be fixed, but it seems that all the arguments passed for the frame parameter are 1 in the other functions. This solution worked enough for me to visualize a WebRTC stream.

99c140cba67c2870a6b1f4b86f91b9ca