YouTube搜索
搜索视频与频道并获取
为Moltbot/Clawdbot网页聊天添加浏览器音频通知功能。当新消息到达且标签页处于后台时自动播放提示音,避免错过重要信息。
解决网页聊天工具后台运行时的消息遗漏问题,通过智能音频提醒确保客服人员及时响应。针对多标签页工作场景,仅在窗口隐藏时触发提示,避免前台干扰;五级响度与自定义音效适配不同办公环境,从开放式工位到嘈杂仓库均可清晰感知。
落地案例:某电商客服团队使用Moltbot接待咨询:客服A同时处理订单系统与聊天页面,当聊天标签处于后台时,新客咨询自动播放定制提示音。主管将重要客户群设为高响度级别,普通咨询设为耳语模式,既保证紧急消息不遗漏,又减少重复切换标签的操作负担。
安装步骤:
<script src="/js/howler.min.js"></script>
<script src="/js/notification.js"></script>
<script>
const notifier = new WebchatNotifications({
soundPath: '/sounds/notification'
});
notifier.init();
</script>
socket.on('message', () => {
if (notifier) notifier.notify();
});
基础调用:
const notifier = new WebchatNotifications({
soundPath: './sounds',
soundName: 'level3',
defaultVolume: 0.7
});
await notifier.init();
socket.on('message', () => notifier.notify());
见下方输入与输出表格。
| 项目 | 内容 |
|---|---|
| 输入 | 消息事件触发、音效路径配置、音量数值(0-1)、响度级别(level1-level5)、冷却时间毫秒数 |
| 输出 | 音频播放执行、设置状态反馈、可选调试日志输出 |
| 适用人群 | 网页聊天系统运营者、需要后台消息提醒的多标签页工作者、Moltbot/Clawdbot用户 |
| 不包含 | 服务器端推送逻辑、消息内容解析处理、操作系统级桌面通知 |
原始链接:https://github.com/openclaw/skills/tree/main/skills/brokemac79/webchat-audio-notifications/SKILL.md
来源类型:GitHub仓库