Closed Gurupatic closed 3 months ago
i think that just means your relative file location is not found (require should return a number ? but returned a NaN ?) if thats not the case u can copy how example does it https://github.com/doublesymmetry/react-native-track-player/blob/main/example/src/services/QueueInitialTracksService.ts
I just ran into this error too using RNTP 4.0.1 with Xcode v15.0.1 (15A507) and iOS Simulator 15 Pro Max...when I inspect the track in PlaybackActiveTrackChanged
I see the following url:
So it appears the issue is happening even with a remote track for me?
The error only seems to get thrown when I have "Debug with Chrome" turned on. If I dismiss the error, RNTP still seems to play the audio correctly.
+1 facing same issue with Debugger turned on
This issue is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.
This issue was closed because it has been stalled for 7 days with no activity.
code const AppAudio = { starting: require("../../../../assets/audio/listenStartTone.wav"), };
const Track = { url: AppAudio.starting, title: "Noonan Welcome", artist: "Noonan Bot", artwork: "Noonan", };
const WelcomeVoiceNoteHandler = async () => { try { await TrackPlayer.reset(); await TrackPlayer.add(Track); await TrackPlayer.play(); } catch (e) { console.log("🚀 🚀 ~ WelcomeVoiceNoteHandler ~ e:", e); } };
useEffect(() => { WelcomeVoiceNoteHandler(); }, []);
Error
Describe the Bug
Adding a track with a path to a local file causes an error
https://github.com/doublesymmetry/react-native-track-player/assets/151741365/27200023-4664-4c83-9d29-433f6fca042b
Steps To Reproduce configure TrackPlayer and call this function by replacing the path to the local file with your own path
Code To Reproduce Please provide a simple code example that allows others to replicate the bug.
Environment Info: IOS simulator TrackPlayer 4.0.1