feat(新疆大屏): 新增体温异常预警提示音

- public:新增 temperature.mp3 体温异常告警音效
- src/utils/socket.ts:体温异常告警接入语音播报,播放提示音,停止告警时关闭音效

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-08-28 18:14:59 +08:00
co-authored by Claude Opus 4.7
parent 5293b509b2
commit 9431553951
2 changed files with 8 additions and 1 deletions
Binary file not shown.
+8 -1
View File
@@ -25,9 +25,10 @@ const audioMgr = createAudioManager({
c: 'oxygen.mp3',
d: '13203.wav',
e: 'fall_down.mp3',
f: 'temperature.mp3',
});
type AudioType = 'a' | 'b' | 'c' | 'd' | 'e';
type AudioType = 'a' | 'b' | 'c' | 'd' | 'e' | 'f';
interface PlayerState {
audio: HTMLAudioElement;
@@ -198,6 +199,9 @@ export function useSocket(p = basicPath, hasTimestamp: boolean = true) {
case 'fall_down':
audioMgr.play('e', 1);
break;
case 'temperature_anomalies':
audioMgr.play('f', 1);
break;
default:
audioMgr.play('d', 1);
break;
@@ -218,6 +222,9 @@ export function useSocket(p = basicPath, hasTimestamp: boolean = true) {
case 'fall_down':
audioMgr.stop('e');
break;
case 'temperature_anomalies':
audioMgr.stop('f');
break;
default:
audioMgr.stop('d');
break;