Use the setMute
command in the playerVolume
namespace to mute and unmute a player.
Endpoint
POST
1 |
/players/{playerId}/playerVolume/mute |
Request Parameters
This command requires a playerId
to determine the target of the command. See the Control documentation for details.
See the table below for a description of the parameter in the body.
Parameter | Type | Value |
---|---|---|
muted |
boolean | true to mute the player or false to unmute the player. |
Response
Returns an empty body with a success
value of true if successful. The player generates a playerVolume
event if the mute state was changed.
In the event of a failure, returns a globalError
event.
Example
Request
1 2 3 |
{ "muted": true } |
If mute was changed, the player will also send a playerVolume
event.