react-native-track-player icon indicating copy to clipboard operation
react-native-track-player copied to clipboard

Property 'nextTrack' does not exist on type '{ lastIndex?: number | undefined; lastTrack?: Track | undefined; lastPosition: number

Open Jackie-gurung opened this issue 1 year ago • 3 comments

useTrackPlayerEvents([Event.PlaybackActiveTrackChanged], async (event) => { switch (event.type) { case Event.PlaybackActiveTrackChanged: const playingTrack = await TrackPlayer.getTrack(event.nextTrack); setTrack(playingTrack); break; } });

Environment Info: System: OS: Linux 5.15 Ubuntu 20.04.6 LTS (Focal Fossa) CPU: (8) x64 Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz Memory: 458.32 MB / 7.65 GB Shell: version: 5.0.17 path: /bin/bash Binaries: Node: version: 19.6.0 path: ~/.nvm/versions/node/v19.6.0/bin/node Yarn: Not Found npm: version: 9.7.2 path: ~/.nvm/versions/node/v19.6.0/bin/npm Watchman: Not Found SDKs: Android SDK: API Levels: - "33" - "34" Build Tools: - 33.0.1 - 34.0.0 - 35.0.0 System Images: - android-33 | Google APIs Intel x86_64 Atom Android NDK: Not Found IDEs: Android Studio: Not Found Languages: Java: version: 17.0.10 path: /usr/bin/javac Ruby: version: 2.7.0 path: /usr/bin/ruby npmPackages: "@react-native-community/cli": Not Found react: installed: 18.2.0 wanted: 18.2.0 react-native: installed: 0.73.5 wanted: 0.73.5 npmGlobalPackages: "react-native": Not Found Android: hermesEnabled: true newArchEnabled: false iOS: hermesEnabled: Not found newArchEnabled: false

"react-native-track-player": "^4.0.1",

Jackie-gurung avatar Mar 06 '24 15:03 Jackie-gurung

if u come across the docs ud notice, nextTrack indeed doesnt exist on Event.PlaybackActiveTrackChanged. https://rntp.dev/docs/api/events#playbackactivetrackchanged

lovegaoshi avatar Mar 06 '24 15:03 lovegaoshi

Yes. what can be done to get next track ?

Jackie-gurung avatar Mar 06 '24 16:03 Jackie-gurung

currentindex +1?? its not like shuffle is nqtively supported yet

On Wed, Mar 6, 2024, 8:31 AM Jackie-gurung @.***> wrote:

Yes. what can be done to get next track ?

— Reply to this email directly, view it on GitHub https://github.com/doublesymmetry/react-native-track-player/issues/2263#issuecomment-1981274075, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZMOVVXBT5M57AZHGVSQLCTYW5AFNAVCNFSM6AAAAABEJI7LB2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBRGI3TIMBXGU . You are receiving this because you commented.Message ID: @.*** com>

lovegaoshi avatar Mar 06 '24 16:03 lovegaoshi

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] avatar Jun 05 '24 01:06 github-actions[bot]

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

github-actions[bot] avatar Jun 12 '24 01:06 github-actions[bot]