enhance(frontend): リアクション選択時に音を流せるように (#12441)

* (add) リアクション選択時に音を鳴らせるように

* Update Changelog

* tweak sound

* tweak sound

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
かっこかり 2023-11-26 13:04:44 +09:00 committed by GitHub
parent d32631d159
commit 5bdae9f6d0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 29 additions and 2 deletions

View file

@ -38,6 +38,8 @@ export const soundsTypes = [
'syuilo/waon',
'syuilo/popo',
'syuilo/triple',
'syuilo/bubble1',
'syuilo/bubble2',
'syuilo/poi1',
'syuilo/poi2',
'syuilo/pirori',
@ -77,7 +79,7 @@ export async function loadAudio(file: string, useCache = true) {
return audioBuffer;
}
export function play(type: 'noteMy' | 'note' | 'antenna' | 'channel' | 'notification') {
export function play(type: 'noteMy' | 'note' | 'antenna' | 'channel' | 'notification' | 'reaction') {
const sound = defaultStore.state[`sound_${type}`];
if (_DEV_) console.log('play', type, sound);
if (sound.type == null) return;