Skip to content

ActionData - PlayAudio

Play Audio Action Parameters

Attributes

Name Data Type Description
audioId string optional;
local audio resource identifier, default is filename
url string optional;
audio online URL
volume number volume; 0~100
mode number execution mode;
1 - host computer execution
2 - chassis execution
interval number Interval time for loop playback; unit: seconds
-1 means play only once
num number optional; number of plays
duration number optional; total playback time; unit: seconds
If the num parameter is also set, the num parameter setting shall prevail
channel number playback channel;
1 - normal music
2 - background music
The chassis does not support multi-channel playback

Example

JavaScript
{
  "type": ActionType.PlayAudio,
  "data": {
    "audioId": "3111001",
    "volume": 50,
    "mode": 1,
    "interval": 20,
    "num": 10,
    "channel": 1
  }
}