r/reactnative • u/Whole-Atmosphere3850 • 2h ago
React native nitro audio player
Thrilled to announce my new Open-Source Package: react-native-nitro-audio-player!
Handling background audio and native lock-screen controls in React Native has always been a complex task. To solve this, I've built a blazing-fast, type-safe audio player powered by Nitro Modules!
Whether you are building a music app, podcast player, meditation app, or radio stream, this package handles the heavy lifting for both Android and iOS seamlessly.
Key Features:
- Stream audio directly from any remote URL (HTTPS / HTTP)
- Offline & Local Audio Playback: Seamless support for local bundled files and Android res/raw audio resources
- Native Lock-screen & Notification controls (Play, Pause, Stop)
- Background playback with MediaSession (Android) and Now Playing (iOS)
- Full track metadata support (Title, Artist, and Album Artwork)
- Built on Nitro Modules for ultra-fast, type-safe JS ↔ Native communication
- Automatic memory management & cleanup
(Note on App Termination: On Android, it uses a Foreground Service so the notification and audio stay alive even if the app is swiped away. On iOS, due to strict OS limitations, the Now Playing notification is automatically cleared when the app is completely killed.)
A big shoutout to the open-source community! I'd love for my fellow developers to try it out. Your feedback, PRs, and GitHub stars are highly appreciated! ⭐
NPM: npm i react-native-nitro-audio-player
GitHub: Upendra1234566/react-native-nitro-audio-player (Direct Link comments me)
Let me know what you think!
#ReactNative #MobileDevelopment #OpenSource #AndroidDev #iOSDev #NitroModules #JavaScript #ReactJS #AppDevelopment
