diff --git a/public/fall_down.mp3 b/public/fall_down.mp3 new file mode 100644 index 0000000..aae8e13 Binary files /dev/null and b/public/fall_down.mp3 differ diff --git a/src/utils/socket.ts b/src/utils/socket.ts index 6884323..5aa4180 100644 --- a/src/utils/socket.ts +++ b/src/utils/socket.ts @@ -24,9 +24,10 @@ const audioMgr = createAudioManager({ b: 'oneClick.mp3', c: 'oxygen.mp3', d: '13203.wav', + e: 'fall_down.mp3', }); -type AudioType = 'a' | 'b' | 'c' | 'd'; +type AudioType = 'a' | 'b' | 'c' | 'd' | 'e'; interface PlayerState { audio: HTMLAudioElement; @@ -194,6 +195,9 @@ export function useSocket(p = basicPath, hasTimestamp: boolean = true) { case 'spo2': audioMgr.play('c', 1); break; + case 'fall_down': + audioMgr.play('e', 1); + break; default: audioMgr.play('d', 1); break; @@ -211,6 +215,9 @@ export function useSocket(p = basicPath, hasTimestamp: boolean = true) { case 'spo2': audioMgr.stop('c'); break; + case 'fall_down': + audioMgr.stop('e'); + break; default: audioMgr.stop('d'); break;