aboutsummaryrefslogtreecommitdiff
path: root/webAO/client.js
diff options
context:
space:
mode:
authorCaleb Mabry <36182383+caleb-mabry@users.noreply.github.com>2022-03-23 15:29:59 -0400
committerGitHub <noreply@github.com>2022-03-23 15:29:59 -0400
commit2e734ec14fc760f80e2a9dc81cdf9269220bb791 (patch)
tree8cd2df719cfd42449712408d6dbc340bd470912e /webAO/client.js
parenta263dc01e9d9bbb6c3cc56cfa9f3acb6bbfdc595 (diff)
parent313d3db36e5252cfa06e9a48ef681385730bb7a4 (diff)
Merge pull request #117 from caleb-mabry/audio-to-html
Adding blip sounds to actual audio tags
Diffstat (limited to 'webAO/client.js')
-rw-r--r--webAO/client.js11
1 files changed, 2 insertions, 9 deletions
diff --git a/webAO/client.js b/webAO/client.js
index 14bfd08..bf274db 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -1672,15 +1672,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;