Umm... nothing? 
Theoretically, the whole thing could just be done with pure JavaScript. Howler.js is JavaScript, but it just makes working with audio files a lot easer. (It has a lot of features that Hype should have.) I'm usually against using libraries, such as jQuery, Angular and React, but Howler is really good. I tried using just Hype for the audio, or even adding the JavaScript manually, but I was getting frustrated with all the issues.
Regardless if it's a game or not, you could create a slider for increasing or decreasing the volume on a web page. LocalStorage is per domain. At least, that's what it says here...
...so you'd have to use unique names if you wanted different settings for different pages within the website.
On iOS, it means when the user / player touches the screen.
The sounds themselves aren't saved in LocalStorage... hmm, I wonder if that's possible
...it's just saving the values of the audio preferences. It's just a number from 0-10. Here's an example...
// Load Music Volumne
if (localStorage.mv >= 0) {
var mv = localStorage.mv;
} else {
var mv = 7;
}
So, I'm checking if the local storage "mv" has a value. If not, set it to the default value of 7. If a "Music Volume" value was already set, then that's the value to work with for the variable "mv".
var music = new Howl({
src: ['${resourcesFolderName}/title-screen-dark-feelings.m4a'],
loop: true,
volume: (mv/10),
onfade: function() {
door.play()
}
});
music.play();
So, then I use the Howler.js API for loading the sound. The important part for this discussion is the "volume". I store the volume value as a whole number, but it's really a decimal. That's why it's divided by 10.
What is howler doing?
- One, it's looping the audio seamlessly.
- Two, it fades the music
- Three, it has events. It can trigger other sounds. (When the music fades out, open the door.)
Howler has other features too, such as 3D spatial sound and sound sprites.