Questions tagged [react-native-track-player]

71 questions
2
votes
1 answer

Should I use Expo for expo audio library or React-native-track-player?

I have my project which I initialised with 'react-native init' . I am thinking of using expo audio library because of it's robust functionalities . But , I have read Expo isn't the solution. It increases the app size. You've to eject it in the end.…
1
vote
0 answers

Trackplayer reset functionality bug

I'm using track player in react-native for ios. I also added background mode functionality from xcode now play functionality works properly and the remote also works but when I pause the music and back to the home screen so using trackplayer.reset()…
1
vote
1 answer

Save state on react navigation modal close with react native track player

I have a react-navigation screen set as a modal with a react-native-track player in it. Initially, it loads with no issue, but when I close the modal and open it back - the audio plays but the artwork and details are not visible. Looks like…
1
vote
1 answer

Occasional error "{AppName} keeps stopping", on closing an app with react-native-track-player in the foreground

I am creating an app which uses react-native-track-player in the foreground. Occasionally on closing the app I get an android message App Name keeps stopping. The error feedback on the device provides the following details Report Type:…
1
vote
1 answer

Why isn't my fetched blob audio file getting played? I'm using React Native Track Player

I'm currently using the React Native Track Player for playing audio, and it plays local audio tracks fine. When I fetch it through my private api it correctly gets the audio object in blob form - here is what the console returns when I logged it. …
1
vote
0 answers

expo-av and react-native-track-player use incompatibile versione of exoplayer

I use expo for my app, all work fine in sdk 44 except a few bugs, to resolve that bugs I need to upgrade to sdk 45, now the problem is that in sdk 45 expo-av use an exoplayer versione incompatible with react-native-track-player. Is it possible to…
red
  • 1,529
  • 1
  • 12
  • 33
1
vote
4 answers

WARN No task registered for key TrackPlayer

I am using the react-native-track-player (2.1.3) to implement an audio player in a react-native application. When I initialize the track player in my project I get the following warning message. WARN No task registered for key TrackPlayer I…
Pawara Siriwardhane
  • 1,873
  • 10
  • 26
  • 38
1
vote
0 answers

React-native-track-player NPM install bug with react@17.0.1

I tried installing this module with npm, but recieved a bug which I cannot understand. I have tried to install multiple versions of the package, including the dev-version and none has yielded any good results. I am Wondering wether I have to…
Thinked
  • 49
  • 1
  • 1
  • 7
1
vote
2 answers

Android 12 crash latest react-native-track-player version

After updating app in android 12 and try to run app in android 12 device and simulator facing issue for crashing. Here is issue. androidx.media.session.MediaButtonReceiver: Targeting S+ (version 31 and above) requires that an explicit value for…
1
vote
1 answer

React-Native: cant't build app with react-native-track-player

Problem: I can build the React Native App npx react-native run-android but when I install react-native-track-player yarn add react-native-track-player it fails to build. What I have tried: npm i react-native-track-player(it can't be installed I…
DerWeisse
  • 19
  • 1
  • 3
1
vote
0 answers

react-native-track-player hide notification

i have a player where it will play 4 sound randomly export const startSound = async () => { const random = Math.floor(Math.random() * 4); await TrackPlayer.setupPlayer(); await TrackPlayer.add({ id: random, url:…
1
vote
0 answers

react-native-track-player: How can i fix TypeError: null is not an object (evaluating 'TrackPlayer.STATE_NONE') in android?

I am trying to implement react - native - track - player, but i am stuck with above error please guide me how can i resolve this error.and i have already reinstalled the app two times but in my case error is not short out.i am sharing piece of code…
Ajay Batham
  • 210
  • 1
  • 4
  • 14
1
vote
1 answer

Using react-native-track-player to play selected song from flatlist

I can not figure out how I can play selected track/song from flatlist, I already had a playerscreen.js where I can play songs from my array of songs. I want to achieve users searching for songs and play the song from the selected list from the…
1
vote
1 answer

Possible Unhandled Promise Rejection (id: 0): TypeError: Cannot read property 'title' of undefined in react-native-track-player

I created genres, each genre has an array of songs. I also have Player.js for each genre songs array, but am getting Warning and TypeError message: [Sun Apr 04 2021 05:49:58.513] WARN Possible Unhandled Promise Rejection (id: 0): TypeError:…
1
vote
1 answer

Using react-native-track-player To A Streaming Songs From Napster API

I managed to build a simple music player using react-native-track-player following a tutorial as part of my learning curve in react native. Now, instead of just playing/streaming songs from provided url tracks in my array of songs, I want to stream…