Skip to content

Commit

Permalink
Merge pull request volumio#1 from gotling/master
Browse files Browse the repository at this point in the history
Volume according to the API
  • Loading branch information
volumio authored Oct 11, 2016
2 parents 18cd000 + e5e3517 commit 2fce8f0
Showing 1 changed file with 31 additions and 6 deletions.
37 changes: 31 additions & 6 deletions docs/02_API/02_WebSocket_APIs.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ A good policy for sending data on emits is to configure them as objects: they're
So our message can be:

```js
io.emit('setVolume',{volume:30,mute=false}
io.emit('addToPlaylist', {"name": "Music", "service": "mpd", "uri": "music-library/..."});
```
## Events Documentation

Expand Down Expand Up @@ -101,16 +101,40 @@ search {value:'query'}

Where query is my search query. (note that for using live search, DO NOT send queries with less than 3 characters, they will dramatically slow search operations).

### Set the Volume
### Volume
Set to percentage, raise or lower, mute or unmute.

```
volume {vol:90,mute:false}
Message: *volume*

Data:

* numeric value between 0 and 100
* *mute*
* *umute*
* *+*
* *-*

**Example**
```js
io.emit('volume', 90);
io.emit('volume', '+');
```

Where `vol` is a numeric (0-100) volume level, and mute is a boolean
### Mute
Message: *mute*

**Example**
```js
io.emit('mute', '');
```

### Unmute
Message: *unmute*

When Volume is already muted, sending another "mute" emit will result in Volume being unmuted
**Example**
```js
io.emit('unmute', '');
```

### Multiroom
```
Expand Down Expand Up @@ -405,6 +429,7 @@ Input:
```json
{
"name":"my playlist",
"service":"mpd",
"uri":"USB/..."
}
```
Expand Down

0 comments on commit 2fce8f0

Please sign in to comment.