ACTION_PLAY_MEDIA
Play a local audio file and wait until playback finishes or the timeout stops it. Add sound cues to automated workflows with optional looping and timeout control.
Instructions
播放本地媒体文件(只出声),播完或超时才继续。输出:play_success, play_error, play_completed, play_duration_ms。到超时就停止播放。play_success 只表示开始播放成功,是否自然播完看 play_completed;loop=true 时永远播不完,到 timeout_ms 停止且 play_completed=false。。字符串参数支持 ${var} 插值;结果以变量快照 JSON 返回。
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| loop | No | 循环播放(默认 false) | |
| path | Yes | 媒体文件路径,支持 ${var} | |
| require | No | 执行后要求为 true 的变量名(如 click_success),不满足按出错处理 | |
| on_error | No | 节点出错时:skip=跳过继续(默认),stop=停止整个工作流 | |
| output_var | No | 成功时额外写 true 的变量名 | |
| timeout_ms | No | 等待播放结束的毫秒数(最小 1000);不填=文件时长+3 秒,时长未知时 60 秒 | |
| node_timeout_ms | No | 单节点超时毫秒,0=不限;默认 30 分钟 |