A cross-browser WebAudio wrapper with a narrow API that handles mobile browser quirks and provides consistent playback.
Web Audio Player is a JavaScript library that provides a simplified, cross-browser wrapper for the WebAudio API. It solves the problem of inconsistent WebAudio support across different browsers and devices, particularly on mobile platforms where audio playback has numerous quirks and limitations. The library abstracts away the differences between streaming audio via media elements and buffered audio via AudioBuffer sources.
Web developers and creative coders building audio-intensive web applications that need to work reliably across desktop and mobile browsers, especially those implementing WebAudio effects like reverb or frequency analysis.
Developers choose Web Audio Player because it handles the messy cross-browser compatibility issues of WebAudio out of the box, providing a clean, consistent API. Its narrow focus on solving real-world mobile WebAudio problems makes it more reliable than building custom solutions or using more complex audio frameworks.
a cross-browser WebAudio player
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically switches between MediaElement and Buffer sources to handle inconsistencies in Chrome, Firefox, Safari, and mobile browsers, providing a unified API for playback.
Specifically addresses iOS and Android WebAudio bugs, such as sample rate distortion and auto-play restrictions, with documented workarounds like ios-safe-audio-context integration.
Emits load, end, error, and progress events for precise control over audio lifecycle, making it easy to integrate with WebAudio effects like reverb or frequency analysis.
Returns a GainNode that connects directly to other WebAudio nodes, enabling audio graph construction with minimal setup for effects and processing.
Lacks built-in seeking (currentTime property) and advanced playback controls, as acknowledged in the Roadmap, requiring developers to implement these manually or wait for updates.
On iOS, audio playback must be triggered by specific touch events (e.g., touchend without drag), and the library doesn't fully abstract this, leaving gesture detection to the developer.
Targets only browsers with WebAudio support, making it unsuitable for environments where audio must work in older browsers without WebAudio, as stated in the README.
When using buffer sources, audio files must be fully downloaded and decoded before playback, leading to delays and increased memory usage, especially for large files.