diff options
| author | caleb.mabry.15@cnu.edu <caleb.mabry.15@cnu.edu> | 2022-03-17 20:00:07 -0400 |
|---|---|---|
| committer | caleb.mabry.15@cnu.edu <caleb.mabry.15@cnu.edu> | 2022-03-17 20:00:07 -0400 |
| commit | 1899c8058fde577318c1911a35108ea8d91cd1a7 (patch) | |
| tree | 3a955d4086c4b1ba1b512c199c12bb86d6fed893 /webAO/client.js | |
| parent | 34653b82f175af4df5995ce9194fd8ffbaed5015 (diff) | |
Adding blip sounds to actual audio tags
Diffstat (limited to 'webAO/client.js')
| -rw-r--r-- | webAO/client.js | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/webAO/client.js b/webAO/client.js index 8bac1cc..7e82d91 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -1674,15 +1674,8 @@ class Viewport { ]; // Allocate multiple blip audio channels to make blips less jittery - - this.blipChannels = new Array( - new Audio(`${AO_HOST}sounds/general/sfx-blipmale.opus`), - new Audio(`${AO_HOST}sounds/general/sfx-blipmale.opus`), - new Audio(`${AO_HOST}sounds/general/sfx-blipmale.opus`), - new Audio(`${AO_HOST}sounds/general/sfx-blipmale.opus`), - new Audio(`${AO_HOST}sounds/general/sfx-blipmale.opus`), - new Audio(`${AO_HOST}sounds/general/sfx-blipmale.opus`), - ); + const blipSelectors = document.getElementsByClassName('blipSound') + this.blipChannels = [...blipSelectors]; this.blipChannels.forEach((channel) => channel.volume = 0.5); this.blipChannels.forEach((channel) => channel.onerror = opusCheck(channel)); this.currentBlipChannel = 0; |
