Describe the Bug
A clear and concise description of what the bug is.
when I call the seekTo() function. The current Track's progress position is back to 0 again. Platform is Android.
Steps To Reproduce
How can someone else reproduce this bug?
Code To Reproduce
Please provide a simple code example that allows others to replicate the bug.
<Slider
style={{
width: "95%",
height: 20,
alignSelf: "center",
}}
minimumValue={0}
maximumValue={
!!currentTrack ? (currentTrack?.duration as number) : 280
}
thumbTintColor={"#fff"}
value={progress.position}
// onSlidingComplete={(value: number) => {
// }}
onValueChange={(value) => {
console.log(value);
jumpTo(value);
console.log("value");
}}
step={2}
tapToSeek={true}
minimumTrackTintColor={generalProperties.primary}
maximumTrackTintColor="#6B6B6B"
/>
// I can get the value, but position still start to 0.
const jumpTo = async (value: number) => {
console.log(value);
await TrackPlayer.seekTo(value);
};
Environment Info:
Paste the results of npx react-native info
System:
OS: Windows 10 10.0.22621
CPU: (8) x64 Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz
Memory: 449.89 MB / 15.67 GB
Binaries:
Node:
version: 16.18.1
path: C:\Program Files\nodejs\node.EXE
Yarn:
version: 1.22.19
path: ~\AppData\Roaming\npm\yarn.CMD
npm:
version: 9.7.2
path: C:\Program Files\nodejs\npm.CMD
Watchman: Not Found
SDKs:
Android SDK: Not Found
Windows SDK: Not Found
IDEs:
Android Studio: Not Found
Visual Studio:
17.6.33829.357 (Visual Studio Community 2022)
Languages:
Java:
version: javac 11
path: /d/java/jdk-11/bin/javac
Ruby: Not Found
npmPackages:
"@react-native-community/cli": Not Found
react:
installed: 18.2.0
wanted: 18.2.0
react-native:
installed: 0.72.4
wanted: 0.72.4
react-native-windows: Not Found
npmGlobalPackages:
"react-native": Not Found
Android:
hermesEnabled: Not found
newArchEnabled: Not found
iOS:
hermesEnabled: Not found
newArchEnabled: Not found
Paste the exact react-native-track-player version you are using
"react-native-track-player": "^4.0.0-rc09",
Real device? Or simulator?
simulator
What OS are you running?
Android
How I can Help
What can you do to help resolve this?
I can provide some pieces of code where the problem happened.
Have you investigated the underlying JS or Swift/Android code causing this bug?
Can you create a Pull Request with a fix?
No.
Describe the Bug A clear and concise description of what the bug is. when I call the seekTo() function. The current Track's progress position is back to 0 again. Platform is Android.
Steps To Reproduce How can someone else reproduce this bug?
Code To Reproduce Please provide a simple code example that allows others to replicate the bug.
Replicable on Example App? Can you replicate this bug in the React Native Track Player Example App?
Environment Info: Paste the results of
npx react-native info
System: OS: Windows 10 10.0.22621 CPU: (8) x64 Intel(R) Core(TM) i5-1035G1 CPU @ 1.00GHz Memory: 449.89 MB / 15.67 GB Binaries: Node: version: 16.18.1 path: C:\Program Files\nodejs\node.EXE Yarn: version: 1.22.19 path: ~\AppData\Roaming\npm\yarn.CMD npm: version: 9.7.2 path: C:\Program Files\nodejs\npm.CMD Watchman: Not Found SDKs: Android SDK: Not Found Windows SDK: Not Found IDEs: Android Studio: Not Found Visual Studio:
Paste the exact
react-native-track-player
version you are usingReal device? Or simulator?
simulator
What OS are you running?
Android
How I can Help What can you do to help resolve this?
I can provide some pieces of code where the problem happened.
Have you investigated the underlying JS or Swift/Android code causing this bug? Can you create a Pull Request with a fix? No.