diff options
| author | stonedDiscord <Tukz@gmx.de> | 2023-09-20 13:10:36 +0200 |
|---|---|---|
| committer | stonedDiscord <Tukz@gmx.de> | 2023-09-20 13:10:36 +0200 |
| commit | dda92bd41f4bee11e2cc5de265ce4fbf5221f1ff (patch) | |
| tree | bcb0f8121955ff815758b30ec4e24a1e6bde4fba /webAO/dom/opusCheck.ts | |
| parent | 59028dd4046ad0715d80be8d1ed0031f20f05b7a (diff) | |
autoformat with eslint
Diffstat (limited to 'webAO/dom/opusCheck.ts')
| -rw-r--r-- | webAO/dom/opusCheck.ts | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/webAO/dom/opusCheck.ts b/webAO/dom/opusCheck.ts index 5f0248d..608a30a 100644 --- a/webAO/dom/opusCheck.ts +++ b/webAO/dom/opusCheck.ts @@ -3,20 +3,20 @@ * @param {HTMLAudioElement} image the element containing the missing sound */ export function opusCheck( - channel: HTMLAudioElement + channel: HTMLAudioElement ): OnErrorEventHandlerNonNull { - const audio = channel.src; - if (audio === "") { - return; - } - console.warn(`failed to load sound ${channel.src}`); - let oldsrc = ""; - let newsrc = ""; - oldsrc = channel.src; - if (!oldsrc.endsWith(".opus")) { - newsrc = oldsrc.replace(".mp3", ".opus"); - newsrc = newsrc.replace(".wav", ".opus"); - channel.src = newsrc; // unload so the old sprite doesn't persist - } + const audio = channel.src; + if (audio === "") { + return; + } + console.warn(`failed to load sound ${channel.src}`); + let oldsrc = ""; + let newsrc = ""; + oldsrc = channel.src; + if (!oldsrc.endsWith(".opus")) { + newsrc = oldsrc.replace(".mp3", ".opus"); + newsrc = newsrc.replace(".wav", ".opus"); + channel.src = newsrc; // unload so the old sprite doesn't persist + } } window.opusCheck = opusCheck;
\ No newline at end of file |
