Android: seekTo
Unfortunately I haven't found the reason yet, but if you'll try to add seconds with 'seekTo' method as float - it won't work. The issue is only reproduced:
- Android
- state: isPlaying
- position is not integer
:green_circle: Works: audioPlayer.seekTo(currentPosition + 15)
:red_circle: Failed: audioPlayer.seekTo(currentPosition + 15.1)
You are right, I noticed this bug as well. I am always using
player.seekTo(parseInt(time))
@PavelShvets-dev do you have a stack trace, i am having an assumpsion around android/src/main/java/org/dwbn/plugins/playlist/PlaylistPlugin.kt:277 but not sure about the cause
@phiamo hi! btw thank you for plugin, great work 🙂 I tried to add some logs into PlaylistPlugin and results are here: V/Capacitor: callback: 29660263, pluginId: Playlist, methodName: seekTo, methodData: {"position":15.85} I/PlaylistPlugin: >>currentProgress 0 (log after 272 line) I/PlaylistPlugin: >>position 850 (log after 277 line) I/PlaylistPlugin: >>seekPosition 0 (log after 277 line)
So, android/src/main/java/org/dwbn/plugins/playlist/PlaylistPlugin.kt:275 already returns wrong value (just a decimal part of seek value)
if this is still persisting please reopen