diff options
| author | stonedDiscord <stoned@derpymail.org> | 2020-02-15 21:33:32 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-15 21:33:32 +0100 |
| commit | d11f6d4506dc00038963624cd3682fc4058e07db (patch) | |
| tree | 671c4607683f3b3277f91543bc1d5e7f4e4f989a /webAO/client.js | |
| parent | aa15aae55a85648a7248032e932778f14feb0d12 (diff) | |
| parent | 131bc522be92901321e89896a00d548f4b55ac4f (diff) | |
Merge pull request #46 from AttorneyOnline/oldaudio
Oldaudio
Diffstat (limited to 'webAO/client.js')
| -rw-r--r-- | webAO/client.js | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/webAO/client.js b/webAO/client.js index 3353cc1..dda1c63 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -371,7 +371,7 @@ class Client extends EventEmitter { document.querySelector('#client_themeselect [value="' + cookietheme + '"]').selected = true; reloadTheme(); - document.getElementById("client_mvolume").value = getCookie("musicVolume"); + document.getElementById("client_musicaudio").volume = getCookie("musicVolume"); changeMusicVolume(); document.getElementById("client_svolume").value = getCookie("sfxVolume"); changeSFXVolume(); @@ -588,7 +588,6 @@ class Client extends EventEmitter { */ handleRMC(args) { viewport.music.pause(); - viewport.music = new Audio(this.musicList[args[1]]); const music = viewport.music; // Music offset + drift from song loading music.totime = args[1]; @@ -1178,9 +1177,6 @@ class Viewport { "cyan" ]; - this.blip = new Audio(AO_HOST + "sounds/general/sfx-blipmale.wav"); - this.blip.volume = 0.5; - // Allocate multiple blip audio channels to make blips less jittery this.blipChannels = new Array(6); @@ -1193,7 +1189,7 @@ class Viewport { this.shoutaudio = new Audio(); - this.music = new Audio(); + this.music = document.getElementById("client_musicaudio"); this.music.play(); this.updater = null; @@ -1847,8 +1843,7 @@ window.area_click = area_click; * Triggered by the music volume slider. */ export function changeMusicVolume() { - viewport.music.volume = document.getElementById("client_mvolume").value / 100; - setCookie("musicVolume", document.getElementById("client_mvolume").value); + setCookie("musicVolume", document.getElementById("client_musicaudio").volume); } window.changeMusicVolume = changeMusicVolume; |
