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

Feat: restore the "backend: 'WebAudio'" option #3281

Merged
merged 6 commits into from
Oct 19, 2023
Merged

Feat: restore the "backend: 'WebAudio'" option #3281

merged 6 commits into from
Oct 19, 2023

Conversation

katspaugh
Copy link
Owner

Short description

Resolves #3272

I've restored the backend: 'WebAudio' option.

Implementation details

There's a new class WebAudioPlayer that can be used as a drop-in replacement for a HTMLMediaElement. It emulates an audio element via a Web Audio buffer source node.

Checklist

  • This PR is covered by e2e tests
  • It introduces no breaking API changes

@katspaugh katspaugh changed the title Webaudio Feat: restore the "backend: 'WebAudio'" option Oct 18, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Oct 18, 2023

ESLint Summary View Full Report

Annotations are provided inline on the Files Changed tab. You can also see all annotations that were generated on the annotations page.

Type Occurrences Fixable
Errors 0 0
Warnings 0 0
Ignored 4 N/A
  • Result: ✅ success
  • Annotations: 0 total

Report generated by eslint-plus-action

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Oct 18, 2023

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 4d560df
Status: ✅  Deploy successful!
Preview URL: https://60b007a8.wavesurfer-js.pages.dev
Branch Preview URL: https://webaudio.wavesurfer-js.pages.dev

View logs

@hannahblair
Copy link
Contributor

  • Q: Does wavesurfer support large files?
  • A: Since wavesurfer decodes audio entirely in the browser using Web Audio, large clips may fail to decode due to memory constraints. We recommend using pre-decoded peaks for large files (see this example). You can use a tool like bbc/audiowaveform to generate peaks.

I think this question in the README also needs an update. 🙂

@katspaugh
Copy link
Owner Author

In what sense? Nothing is changed in this regard, Web Audio has always been used for decoding. This PR is only about the playback mechanism.

@hannahblair
Copy link
Contributor

In what sense? Nothing is changed in this regard, Web Audio has always been used for decoding. This PR is only about the playback mechanism.

Ah, understood. Ignore me!

@katspaugh katspaugh merged commit c912f85 into main Oct 19, 2023
@katspaugh katspaugh deleted the webaudio branch October 19, 2023 20:23
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

Successfully merging this pull request may close these issues.

Bring back Web Audio playback support
2 participants