diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-03-13 20:04:38 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-03-13 20:04:38 +0900 |
| commit | 7887ccc9935644f29e079d2f5ebc65fc32e1f5cf (patch) | |
| tree | e233f8362f5ab094bb1ca528980f457967fd52b6 | |
| parent | chore(client): tweak admin/roles page (diff) | |
| parent | refactor(frontend): 引数の型を強くし、関数内部のas anyを除去... (diff) | |
| download | sharkey-7887ccc9935644f29e079d2f5ebc65fc32e1f5cf.tar.gz sharkey-7887ccc9935644f29e079d2f5ebc65fc32e1f5cf.tar.bz2 sharkey-7887ccc9935644f29e079d2f5ebc65fc32e1f5cf.zip | |
Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop
| -rw-r--r-- | packages/frontend/src/scripts/sound.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/frontend/src/scripts/sound.ts b/packages/frontend/src/scripts/sound.ts index b08982facb..35fd007e64 100644 --- a/packages/frontend/src/scripts/sound.ts +++ b/packages/frontend/src/scripts/sound.ts @@ -72,8 +72,8 @@ export function setVolume(audio: HTMLAudioElement, volume: number): HTMLAudioEle return audio; } -export function play(type: string) { - const sound = ColdDeviceStorage.get('sound_' + type as any); +export function play(type: 'noteMy' | 'note' | 'antenna' | 'channel' | 'notification') { + const sound = ColdDeviceStorage.get(`sound_${type}`); if (sound.type == null) return; playFile(sound.type, sound.volume); } |