[GH-ISSUE #332] No method to get playback position #218

Closed
opened 2026-02-27 19:29:28 +03:00 by kerem · 1 comment
Owner

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?

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?
kerem closed this issue 2026-02-27 19:29:28 +03:00
Author
Owner

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

<!-- gh-comment-id:485108194 --> @ashthespy commented on GitHub (Apr 20, 2019): You could get by with something along these lines that I started working on for prefetch e1ab35bdf0cbad7976e58b73518af9b63fa2a19f : https://github.com/librespot-org/librespot/blob/e1ab35bdf0cbad7976e58b73518af9b63fa2a19f/audio/src/lewton_decoder.rs#L27-L32
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/librespot#218
No description provided.