A Capacitor plugin for playing sounds natively on Android, iOS, and Web with a unified API.
Native Audio is a Capacitor plugin that provides a native audio engine for playing sounds in cross-platform applications. It solves the problem of inconsistent and low-performance audio playback on web views by leveraging Android, iOS, and Web native audio APIs through a unified JavaScript interface.
Mobile developers using Capacitor or Ionic framework who need reliable, performant audio playback in their Android, iOS, and web applications, such as for games, media apps, or notification sounds.
Developers choose Native Audio because it offers a consistent, easy-to-use API across all platforms with native performance, avoiding the pitfalls of HTML5 audio in hybrid apps. It's maintained by the Capacitor community and supports essential features like preloading, looping, and volume control.
Native Audio is a Capacitor community plugin that provides a native audio engine for cross-platform mobile and web applications. It enables developers to play, control, and manage audio files efficiently across Android, iOS, and Web platforms using a single JavaScript API, bypassing the limitations of web audio for better performance and reliability.
Native Audio focuses on providing a simple, consistent interface to native audio capabilities, ensuring reliable sound playback in Capacitor apps without compromising on platform-specific optimizations.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Leverages platform-specific audio engines on Android and iOS for low-latency playback, avoiding web view limitations as highlighted in the key features.
Offers a consistent TypeScript/JavaScript interface for Android, iOS, and Web, simplifying development with methods like play() and pause() that work identically across platforms.
Provides comprehensive control with methods for play, pause, loop, volume adjustment, and seeking, all documented in the usage examples.
Supports listening to audio completion events via addListener('complete', ...), enabling reactive app behaviors as shown in the API section.
Requires manual placement of audio files in different directories for Android, iOS, and Web (e.g., android/app/src/assets), increasing setup complexity and potential for errors.
Lacks support for audio effects, streaming, or complex manipulations, focusing only on basic playback, which may not suffice for media-rich applications.
Methods like getDuration and getCurrentTime only work when audioChannelNum is 1, as noted in the usage comments, limiting functionality for multi-channel audio.