feat(新疆大屏): 新增体温异常预警提示音
- public:新增 temperature.mp3 体温异常告警音效 - src/utils/socket.ts:体温异常告警接入语音播报,播放提示音,停止告警时关闭音效 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Binary file not shown.
+8
-1
@@ -25,9 +25,10 @@ const audioMgr = createAudioManager({
|
|||||||
c: 'oxygen.mp3',
|
c: 'oxygen.mp3',
|
||||||
d: '13203.wav',
|
d: '13203.wav',
|
||||||
e: 'fall_down.mp3',
|
e: 'fall_down.mp3',
|
||||||
|
f: 'temperature.mp3',
|
||||||
});
|
});
|
||||||
|
|
||||||
type AudioType = 'a' | 'b' | 'c' | 'd' | 'e';
|
type AudioType = 'a' | 'b' | 'c' | 'd' | 'e' | 'f';
|
||||||
|
|
||||||
interface PlayerState {
|
interface PlayerState {
|
||||||
audio: HTMLAudioElement;
|
audio: HTMLAudioElement;
|
||||||
@@ -198,6 +199,9 @@ export function useSocket(p = basicPath, hasTimestamp: boolean = true) {
|
|||||||
case 'fall_down':
|
case 'fall_down':
|
||||||
audioMgr.play('e', 1);
|
audioMgr.play('e', 1);
|
||||||
break;
|
break;
|
||||||
|
case 'temperature_anomalies':
|
||||||
|
audioMgr.play('f', 1);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
audioMgr.play('d', 1);
|
audioMgr.play('d', 1);
|
||||||
break;
|
break;
|
||||||
@@ -218,6 +222,9 @@ export function useSocket(p = basicPath, hasTimestamp: boolean = true) {
|
|||||||
case 'fall_down':
|
case 'fall_down':
|
||||||
audioMgr.stop('e');
|
audioMgr.stop('e');
|
||||||
break;
|
break;
|
||||||
|
case 'temperature_anomalies':
|
||||||
|
audioMgr.stop('f');
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
audioMgr.stop('d');
|
audioMgr.stop('d');
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user