Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Android: seekTo #17

Open
PavelShvets-dev opened this issue Mar 22, 2022 · 3 comments
Open

Android: seekTo #17

PavelShvets-dev opened this issue Mar 22, 2022 · 3 comments

Comments

@PavelShvets-dev
Copy link

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

馃煝 Works: audioPlayer.seekTo(currentPosition + 15)
馃敶 Failed: audioPlayer.seekTo(currentPosition + 15.1)

@thoasty-dev
Copy link
Contributor

You are right, I noticed this bug as well. I am always using

player.seekTo(parseInt(time))

@phiamo
Copy link
Owner

phiamo commented Mar 27, 2022

@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

@PavelShvets-dev
Copy link
Author

@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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants