mirror of
https://github.com/devgianlu/go-librespot.git
synced 2026-04-26 05:15:49 +03:00
[GH-ISSUE #194] Feature - Create a event to track playback progress #126
Labels
No labels
bug
enhancement
pull-request
spotify-side
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/go-librespot#126
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 @guidcruncher on GitHub (Aug 14, 2025).
Original GitHub issue: https://github.com/devgianlu/go-librespot/issues/194
Feature - Create a event to track playback progress and have it emit an event on the Websocket connection
The event could be something like
progress
I guess most ofthe work is still there with the "metadata" event - it just needs to be updated periodically and emitted as this new event
Reason:
There maybe a requirement for some applications to wait for playback progress to be pushed out to them rather than have to "Poll for it" on a regular basis (Say your implementing a playback progress bar) - Pushing out as a websockect event is generally more efficient than polling as you can have multiple clients "Listening" to a Websocket.
@guidcruncher commented on GitHub (Sep 10, 2025):
I think this could be done locally let me experiment
@devgianlu commented on GitHub (Sep 12, 2025):
Yes, generally you can achieve this by keeping the timestamp at which you received the last position update and then do some calculations. That's how Spotify does it.
I am not closing this yet as it might be useful to have a feature where go-librespot pushes periodic updates, but not sure.