Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Add endpoint to change the volume of the player #66

Closed
justJavaProgrammer opened this issue Jul 28, 2024 · 0 comments · Fixed by #67
Closed

[FEATURE] Add endpoint to change the volume of the player #66

justJavaProgrammer opened this issue Jul 28, 2024 · 0 comments · Fixed by #67
Assignees
Labels
enhancement New feature or request

Comments

@justJavaProgrammer
Copy link
Contributor

justJavaProgrammer commented Jul 28, 2024

Add endpoint to change the volume of the player

Endpoint info:

PUT /player/volume

Query parameters:
volume_percent - an integer from 0 to 100, when a 0 indicating that device is muted and 100 max volume

Response:

204 No Content - command received
400 Bad Request - invalid request received, that contains a reason code.
Possible error codes:

  • invalid_volume - received volume is out of bounds
@justJavaProgrammer justJavaProgrammer added the enhancement New feature or request label Jul 28, 2024
@justJavaProgrammer justJavaProgrammer self-assigned this Jul 28, 2024
justJavaProgrammer added a commit that referenced this issue Jul 29, 2024
Added HTTP endpoint to change the playback volume.

Rules applied:
- if single device is connected, then change the device volume
- If multiple devices connected, then change only device that active
- If no device is connected to player, then error is returned

Written tests.
Added docs.
Small refactoring of classes.

Implementation of #66
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant