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

Web support #17

Open
alejandrogiubel opened this issue May 14, 2022 · 3 comments
Open

Web support #17

alejandrogiubel opened this issue May 14, 2022 · 3 comments

Comments

@alejandrogiubel
Copy link

Hi 👋🏼. Great plugin. Do you have in mind add web support?

@ryanheise
Copy link
Owner

I believe there would be some limits to web support due to the security model. The plugin could hypothetically only read the audio data from audio files originating from the same server or otherwise where permitted by CORS rules.

But you can also consider a server-side solution, since this plugin is designed to produce data in a format that is compatible with audiowaveform which you could build a web service out of.

@ahetawal-p
Copy link

@ryanheise on this, yes we would definitely need web support, our sound files are all hosted on same server and cors should not be an issue.

@ryanheise
Copy link
Owner

In that case, yes it can be done. I have some old code somewhere where I exposed the web audio API to Dart, then it's a matter of implementing this feature over that API. It's not a priority for me, but I'll share below a helpful StackOverflow answer that describes how to use the Web Audio API:

https://stackoverflow.com/questions/22073716/create-a-waveform-of-the-full-track-with-web-audio-api

If anyone wants to contribute a web implementation, you are welcome, but note that the implementation should follow the same algorithm I have used for the Android and iOS implementations in order to be compatible with audiowaveform.

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

3 participants