setAudioVolume (v1.2)
Estimated reading time: 1 minute
- This API provides the function to change the audio volume level.
Syntax
- http://<Base URL>/audio
Authentication Level
- generic
Request
- params' Elements
- An object composed of the following pair(s).
name | type | multiplicity | default | description |
---|---|---|---|---|
target | string | 1 | Output target of the sound. The following values are defined.
|
|
volume | string | 1 | Volume level to set. The following formats are applied.
|
|
ui | string | ? | null |
If the UI (volume bar, etc.) should be displayed, set this "on".
|
- JSON Example
-
{ "method": "setAudioVolume", "id": 98, "params": [{ "volume": "5", "ui": "on", "target": "speaker" }], "version": "1.2" }
Response
- result's Elements
- Not necessary.
- JSON Example
-
{ "result": [], "id": 98 }
- Error Code
- The following error codes are important for this API. Refer to error code for other errors.
code | Explanation |
---|---|
40800 | Target is not supported or cannot be controlled for some device-specific reason. |
40801 | Volume is out of range. |
Last modified: 6 Feb 2019