You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
private xyz.gianlu.librespot.player.Player spotifyPlayer;
void seek(int t)
{
spotifyPlayer.seek(t);
System.out.println("Seek to " + t + ", but player reports " + spotifyPlayer.time());
}
You would expect reported time to be t, but it is not, because there seems to be a delay necessary to seek :
2022-01-08 14:52:57.832 24582-24582/v.blade I/System.out: Seek to 119860, but player reports 5887
This is (to me) a bug ; i suggest the following fixes :
Either use an internal variable position that can be updated instantly and report the value of that variable, even if the player has not already done seek to the position (as it requires network time, i understand)
Or provide a function like waitReady() to wait for player actualization ; i tried with waitReady() but the player is already in a ready state as it is already playing i think
Or provide a way to give a callback to the seek function, for when seek is done
EDIT: I found the event 'onTrackSeeked', which i guess i can work with.
I think that "seeked" does not exist in english, the verb is "sought" ?
Anyway i still think that the first fix is the best way to go because using the API is really weird without that.
To Reproduce
Just use previous code.
Version/Commit
librespot-player:1.6.2
The text was updated successfully, but these errors were encountered:
Describe the bug
Consider the following code :
You would expect reported time to be
t
, but it is not, because there seems to be a delay necessary to seek :This is (to me) a bug ; i suggest the following fixes :
EDIT: I found the event 'onTrackSeeked', which i guess i can work with.
I think that "seeked" does not exist in english, the verb is "sought" ?
Anyway i still think that the first fix is the best way to go because using the API is really weird without that.
To Reproduce
Just use previous code.
Version/Commit
librespot-player:1.6.2
The text was updated successfully, but these errors were encountered: