You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you much for this project, this is exactly what I was looking for. I tried other libraries and this one is the best so far.
Describe the bug
Subscribing to the Event.PlaybackQueueEnded event via the useTrackPlayerEvents hook fires an event before adding tracks to the queue. This happens in Android only.
Current workaround:
useTrackPlayerEvents([Event.PlaybackQueueEnded], (event) => {
const { position, track } = event;
// @android-fix
if (!track && position === 0) {
console.log("Skipping first queue ended event that happens in Android", event);
return;
}
// Queue really ended...
});
Environment (please complete the following information):
Run react-native info in your project and share the content.
What react-native-track-player version are you using? v2.0.1
Are you testing on a real device or in the simulator? Which OS version are you running? real device: Google Pixel 4a
System:
OS: macOS 11.4
CPU: (4) x64 Intel(R) Core(TM) i5-7360U CPU @ 2.30GHz
Memory: 48.41 MB / 16.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 12.16.1 - /usr/local/bin/node
Yarn: 1.22.10 - /usr/local/bin/yarn
npm: 7.15.1 - /usr/local/bin/npm
Watchman: 2021.05.31.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK:
Platforms: iOS 14.5, DriverKit 20.4, macOS 11.3, tvOS 14.5, watchOS 7.4
Android SDK:
API Levels: 28, 29, 30
Build Tools: 28.0.3, 29.0.2, 29.0.3
System Images: android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-30 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.2 AI-202.7660.26.42.7351085
Xcode: 12.5/12E262 - /usr/bin/xcodebuild
Languages:
Java: 15.0.1 - /usr/bin/javac
Python: 2.7.16 - /usr/bin/python
npmPackages:
@react-native-community/cli: Not Found
react: ^17.0.1 => 17.0.1
react-native: ^0.63.4 => 0.63.4
react-native-macos: Not Found
npmGlobalPackages:
*react-native*: Not Found
Code
Please, share the code that is causing the issue:
useTrackPlayerEvents([Event.PlaybackQueueEnded], (event) => {
// Fires before adding tracks to the queue in Android, and not in iOS
});
The text was updated successfully, but these errors were encountered:
Hi there,
Thank you much for this project, this is exactly what I was looking for. I tried other libraries and this one is the best so far.
Describe the bug
Subscribing to the
Event.PlaybackQueueEnded
event via theuseTrackPlayerEvents
hook fires an event before adding tracks to the queue. This happens in Android only.Current workaround:
Environment (please complete the following information):
Run
react-native info
in your project and share the content.What
react-native-track-player
version are you using?v2.0.1
Are you testing on a real device or in the simulator? Which OS version are you running?
real device: Google Pixel 4a
Code
Please, share the code that is causing the issue:
The text was updated successfully, but these errors were encountered: