NightDev Community Forums

Audio Volume Solved


#1

If no one has resolved this yet, here it is.

It states early in the donation/follow alert script that volume control is disabled and can’t be controlled through JS
which isn’t true.

In Tip Alert script do the following.

after line 243 insert a new line with
volume = getParameterByName("volume"),

Next on line 281 insert the following

if(volume){
		if(!isNaN(volume)) {
			soundvolume = parseInt(volume);
			soundvolume = soundvolume/100;
		}
		
	  } else {
			soundvolume = parseInt(100);
			soundvolume = soundvolume/100;
	  }

and on what should be line 294, or more exact, in the beginning inside (on a new line)
alertSound.addEventListener("loadeddata", function() {}

add

alertSound.volume = soundvolume;

now in the URL you can simply do &volume=(number from 1-100)

It’s just as easy to do in the follower alert, but the linenumbers mentioned above might not match.

Enjoy


#2

oh yeah, and maybe you could actually add it into the file for future use?

just an idea


#3

We do not expose this because we don’t want to add an additional setting for it. You are welcome to do that at your own risk.


#4

Risk of what, if you don’t mind me asking?


#5

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.