mirror of
https://github.com/BinaryAlley/Nemera.git
synced 2026-12-02 00:01:10 +00:00
Adds playback preferences and auto-persisted playback state to user settings
This commit is contained in:
1 parent
aab36dcd29
commit
dd76309ded
81 files changed
+6102
-173
No files matched your search
@@ -8,6 +8,12 @@
|
||||
- [Update User Settings](#update-user-settings)
|
||||
- [Update User Settings Request](#update-user-settings-request)
|
||||
- [Update User Settings Response](#update-user-settings-response)
|
||||
- [Get Playback State](#get-playback-state)
|
||||
- [Get Playback State Request](#get-playback-state-request)
|
||||
- [Get Playback State Response](#get-playback-state-response)
|
||||
- [Update Playback State](#update-playback-state)
|
||||
- [Update Playback State Request](#update-playback-state-request)
|
||||
- [Update Playback State Response](#update-playback-state-response)
|
||||
|
||||
## Settings
|
||||
|
||||
@@ -32,11 +38,16 @@ Returns the settings of the currently authenticated user.
|
||||
"userId": "2cff0c0f-3a67-4e30-b94f-f4e948a3b64f",
|
||||
"isPaginationEnabled": true,
|
||||
"itemsPerPage": 50,
|
||||
"ignoreThePrefixForAlphaPicker": true,
|
||||
"shouldIgnoreThePrefixForAlphaPicker": true,
|
||||
"isThemeCachingEnabled": true,
|
||||
"shouldAggregateMetadataWhenMissing": true,
|
||||
"shouldRenderPdfAsImages": false,
|
||||
"shouldPreserveBookStyles": true
|
||||
"shouldPreserveBookStyles": true,
|
||||
"shouldKeepDownloadingWhilePaused": true,
|
||||
"shouldAutoplay": true,
|
||||
"isGaplessPlaybackEnabled": true,
|
||||
"replayGainMode": "Off",
|
||||
"streamingQuality": "Auto"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -54,11 +65,16 @@ Updates the settings of the currently authenticated user.
|
||||
{
|
||||
"isPaginationEnabled": true,
|
||||
"itemsPerPage": 50,
|
||||
"ignoreThePrefixForAlphaPicker": true,
|
||||
"shouldIgnoreThePrefixForAlphaPicker": true,
|
||||
"isThemeCachingEnabled": true,
|
||||
"shouldAggregateMetadataWhenMissing": true,
|
||||
"shouldRenderPdfAsImages": false,
|
||||
"shouldPreserveBookStyles": true
|
||||
"shouldPreserveBookStyles": true,
|
||||
"shouldKeepDownloadingWhilePaused": true,
|
||||
"shouldAutoplay": true,
|
||||
"isGaplessPlaybackEnabled": true,
|
||||
"replayGainMode": "Off",
|
||||
"streamingQuality": "Auto"
|
||||
}
|
||||
```
|
||||
|
||||
@@ -67,3 +83,49 @@ Updates the settings of the currently authenticated user.
|
||||
```js
|
||||
200 Ok
|
||||
```
|
||||
|
||||
### Get Playback State
|
||||
|
||||
#### Get Playback State Request
|
||||
|
||||
```js
|
||||
GET api/v1/users/me/settings/playback-state
|
||||
```
|
||||
|
||||
Returns the playback state (the last volume and mute state) the player reported for the currently authenticated user. The values are written automatically by the player and are never surfaced as settings fields.
|
||||
|
||||
#### Get Playback State Response
|
||||
|
||||
```js
|
||||
200 Ok
|
||||
```
|
||||
|
||||
```json
|
||||
{
|
||||
"volume": 0.75,
|
||||
"isMuted": false
|
||||
}
|
||||
```
|
||||
|
||||
### Update Playback State
|
||||
|
||||
#### Update Playback State Request
|
||||
|
||||
```js
|
||||
PUT api/v1/users/me/settings/playback-state
|
||||
```
|
||||
|
||||
Updates the playback state the player reported for the currently authenticated user. Both fields are required: the volume is a value between 0 and 1, and the mute state is a boolean. A request that omits either field, or sends a volume outside that range, is rejected with a `422 Unprocessable Entity`.
|
||||
|
||||
```json
|
||||
{
|
||||
"volume": 0.75,
|
||||
"isMuted": false
|
||||
}
|
||||
```
|
||||
|
||||
#### Update Playback State Response
|
||||
|
||||
```js
|
||||
200 Ok
|
||||
```
|
||||
Reference in new issue
Block a user