Lavalink icon indicating copy to clipboard operation
Lavalink copied to clipboard

Add volume value to playerUpdate

Open MrJacz opened this issue 5 years ago • 4 comments

It would be nice to have some way to access volume without storing it in the lib each time its set. I think playerUpdate would be the correct incoming message.

MrJacz avatar Mar 27 '19 16:03 MrJacz

Sorry for the super late response, didn't see this before now.

I believe that would be bad API design. Why should the server remind the client every few seconds when the client can just remember the value?

freyacodes avatar Jul 10 '19 02:07 freyacodes

I think it's a reasonable proposal. Since the server is the single point of truth for the volume, there should probably be a way to grab it. A REST that provides this information on demand could be a better choice tho.

schnapster avatar Jul 10 '19 08:07 schnapster

I would just include it in playerUpdate. its not like it would effect anything as its only adding the property to it. I feel it makes more sense for the server to send the volume, it is the part that controls the volume after all.

MrJacz avatar Jul 10 '19 10:07 MrJacz

The volume is only changed when the client asks it to.

Besides, the new filters system is going to treat volume as a filter, deprecating the old way of setting the volume or equalizer.

Edit: I am open to the idea of a general REST API, although I do not have the motivation to develop it personally. The WS protocol works just fine for my client.

freyacodes avatar Jul 10 '19 12:07 freyacodes

to provide an update here. The current rest-api proposal in https://github.com/freyacodes/Lavalink/pull/750 would cover this

topi314 avatar Oct 31 '22 12:10 topi314

implemented in https://github.com/freyacodes/Lavalink/releases/tag/3.7.0

topi314 avatar Jan 14 '23 21:01 topi314