Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render WaveformData object using peaks.js #54

Open
benmackerras opened this issue Oct 2, 2018 · 1 comment
Open

Render WaveformData object using peaks.js #54

benmackerras opened this issue Oct 2, 2018 · 1 comment

Comments

@benmackerras
Copy link

After generating waveform json data server side and using new WaveformData(xhr.responseText, WaveformData.adapters.object); to create my WaveformData object, is there any way I can render the waveform by passing the WaveformData object to peaks.js? I can't use the json data to generate the waveform as it isn't stored on the server.

@chrisn
Copy link
Member

chrisn commented Oct 2, 2018

Peaks.js does not currently have an option where you can give it your own WaveformData object. If you generate the waveform data JSON server-side, you can use the dataUri option to Peaks.init() to load the data, and the Peaks instance will construct its own WaveformData object for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants