doublesymmetry / react-native-track-player

A fully fledged audio module created for music apps. Provides audio playback, external media controls, background mode and more!
https://rntp.dev/
Apache License 2.0
3.25k stars 1k forks source link

type error on Event.PlaybackError #2246

Closed Pnlvfx closed 4 months ago

Pnlvfx commented 8 months ago

PlayackService.ts

TrackPlayer.addEventListener(Event.PlaybackError, err => { console.log(err.code, err.message, 'on PlaybackError'); });

log: undefined undefined on PlaybackError

Steps To Reproduce This error to me happens if I've a track url on the player and then I delete the file on the server, the player try to use that url, which of course is now empty as it was deleted. However typescript say that the PlaybackError should provide an error object with code and message as string, instead they're both undefined. Idk if it is expected (the type is wrong), or if it's a bug.

Code To Reproduce I've explained it up here

Replicable on Example App? Not tested

Environment Info: System: OS: macOS 14.3 CPU: (8) x64 Intel(R) Core(TM) i5-8257U CPU @ 1.40GHz Memory: 15.93 MB / 8.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 21.6.1 path: /usr/local/bin/node Yarn: version: 1.22.19 path: ~/.yarn/bin/yarn npm: version: 10.2.4 path: /usr/local/bin/npm Watchman: version: 2024.01.22.00 path: /usr/local/bin/watchman Managers: CocoaPods: version: 1.15.0 path: /usr/local/bin/pod SDKs: iOS SDK: Platforms:

How I can Help I've not investigated the app as I'm not able to use Swift code, I hope someone will take a look at that

github-actions[bot] commented 5 months ago

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.

github-actions[bot] commented 4 months ago

This issue was closed because it has been stalled for 7 days with no activity.