mirror of
https://github.com/librespot-org/librespot.git
synced 2026-04-27 08:15:50 +03:00
[GH-ISSUE #332] No method to get playback position #218
Labels
No labels
A-Alsa
SpotifyAPI
Tokio 1.0
audio
bug
can't reproduce
compilation
dependencies
duplicate
enhancement
good first issue
help wanted
high priority
imported
imported
invalid
new api
pull-request
question
reverse engineering
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/librespot#218
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @skykooler on GitHub (Apr 19, 2019).
Original GitHub issue: https://github.com/librespot-org/librespot/issues/332
There seems to be no method to directly retrieve the playback position of a librespot_playback::player::Player object. The internal state (Playing/paused/etc) is not exposed either so I can't just count time since playback started (as playback may start several seconds after the load() call due to buffering). Would it be possible to add such a utility method?
@ashthespy commented on GitHub (Apr 20, 2019):
You could get by with something along these lines that I started working on for prefetch
e1ab35bdf0:github.com/librespot-org/librespot@e1ab35bdf0/audio/src/lewton_decoder.rs (L27-L32)