Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork1.1k
A fully fledged audio module created for music apps. Provides audio playback, external media controls, background mode and more!
License
doublesymmetry/react-native-track-player
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A fully-fledged audio module created for music apps. Provides audio playback, external media controls, background mode and more!
Blaze sponsors RNTP by providing super fast Apple Silicon based macOS Github Action Runners. Use the discount codeRNTP50
at checkout to get 50% off your first year.
- Documentation
- Sponsors
- Features
- Why another music module?
- Example Setup
- Core Team ✨
- Special Thanks ✨
- I Have A Bug/Feature Request
- Community
Not sure where to start?
- TryGetting Started.
- Peruse theAPI Docs.
- Run theExample Project.
Are you using RNTP for a personal project? Great! Sponsor us if you're able but otherwise you can support us by reporting any bugs you find, sending us screenshots of your projects and starring us on Github 🌟
Are you using RNTP at your organisation and/or making money from it? Awesome! We rely on your support to keep RNTP developed and maintained under the Apache-2.0 license. You can do that throughGithub Sponsors.
- Lightweight - Optimized to use the least amount of resources according to your needs
- Feels native - As everything is built together, it follows the same design principles as real music apps do
- Multi-platform - Supports Android, iOS and Web
- Media Controls support - Provides events for controlling the app from a Bluetooth device, the lock screen, a notification, a smartwatch or even a car
- Local or network, files or streams - It doesn't matter where the media belongs, we've got you covered
- Adaptive bitrate streaming support - Support for DASH, HLS or SmoothStreaming
- Caching support - Cache media files to play them again without an internet connection
- Background support - Keep playing audio even after the app is in background
- Fully Customizable - Even the notification icons are customizable!
- Supports React Hooks 🎣 - Includes React Hooks for common use-cases so you don't have to write them
After trying to team up modules likereact-native-sound
,react-native-music-controls
andreact-native-google-cast
, I've noticed that their structure and the way they should be tied together can cause a lot of problems (mainly on Android). Those can heavily affect the app stability and user experience.
All audio modules (likereact-native-sound
) don't play in a separated service on Android, which shouldonly be used for simple audio tracks in the foreground (such as sound effects, voice messages, etc.)
react-native-music-controls
is meant for apps using those audio modules, but it has a few problems: the audio isn't tied directly to the controls. It can be pretty useful for casting (such as Chromecast).
react-native-google-cast
works pretty well and also supports custom receivers, but it has fewer player controls, it's harder to integrate and still uses the Cast SDK v2.
First please take a look at theGetting Started guide, but a basic example of how to play a track:
importTrackPlayerfrom'react-native-track-player';conststart=async()=>{// Set up the playerawaitTrackPlayer.setupPlayer();// Add a track to the queueawaitTrackPlayer.add({id:'trackId',url:require('track.mp3'),title:'Track Title',artist:'Track Artist',artwork:require('track.png')});// Start playing itawaitTrackPlayer.play();};start();
David Chavez |
Jacob Spizziri | Jonathan Puckey |
Guilherme Chaguri | Dustin Bahr |
You want this package to be awesome and we want to deliver on that. As you knowalready you can justFile A Ticket, but thats not actually thebest way for you to get what you need (read on to see why). The best way is foryou toBe A Champion anddive into the code.
The reality is that filing a ticket isn't always enough.This is probably onlygoing to work if your issue aligns with both the interestsand the resources available to the core team. Here are the things that align with ourinterestsin order of priority.
- Fixingwidespread, common, and critical Bugs.
- Fixinguncommon but necessary Bugs.
- Introducing newFeatures that have broad value.
Now keep in mind available resources. Long story short, the thing you care aboutneeds to be cared about by either a lot of other people, or by us.
BUT! There's another and, arguably evenbetter way that helps you get whatyou need faster:Be A Champion.
Being achampion makes it easy for us to help you. Which is what we all want!So how can you be a champion?Sponsor the Project orbe willing to write some code.
Ifyou're willing to write some codewe're willing to:
- Open a design discussion, give feedback, and approve something that works.
- Provide guidance in the implementation journey.
So, in a nutshell, let us know you're willing to do the work and ask for a littleguidance, and watch the things you care about get done faster than anyone else.The best help will be given to those who are willing to help themselves.
You may be thinking that you can't help because you know nothing about nativeiOS or Android or maybe even React code. But we're willing to help guide you.
If you're up for that task then we can help you understand native code and howReact Native works.
The only way you go fromnot-knowing toknowing is by learning. Learning isn'tsomething you should be ashamed of nor is it something you should be scared of.
Our goal is to make it as easy as possible for you to make changes to the library.All the documentation on how to work on the library and it's dependencies islocated in this Guide
The standard release command for this project isyarn version
.
yarn version [--major | --minor | --patch | --new-version <version>]
Ex.
yarn version --new-version 1.2.17yarn version --patch // 1.2.17 -> 1.2.18yarn version --minor // 1.2.18 -> 1.3.0yarn version --major // 2.0.0
This command will:
- Generate/update the Changelog
- Bump the package version
- Tag & pushing the commit
- Build & publish the package
You can find us as part of theReact Native Track Player:
#introduce-yourself
- Come greet the newest members of this group!#troubleshooting-forum
- Ask members of the community to trouble shoot issues with your app and make recommendations.#show-and-tell
- Tell the community about the app you made with this project!#news-and-releases
- Stay updated about the latest releases and dev efforts on the project.
About
A fully fledged audio module created for music apps. Provides audio playback, external media controls, background mode and more!
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Sponsor this project
Uh oh!
There was an error while loading.Please reload this page.