gathertown / mapmaking

Maps, tilesets, and assets oh my!
343 stars 124 forks source link

Add custom Sound Emitter (or lower SFX volume for everyone) #12

Open kantner opened 3 years ago

kantner commented 3 years ago

Hi!

I have integrated one of the existing sound emitters into my map, but the volume is too high. I can of course reduce the volume manually by adjusting the SFX volume in the user settings, but I want to use the room for a conference and don't want to impose this on all participants individually (too complicated!).

Hence I see three options: A) Upload new sound file (with lower volume) in a custom sound emitter object. B) Replace sound file linked to an existing sound emitter. C) Set the SFX volume globally for everyone somewhere in the admin controls.

... what can I do?

Thanks!

securitybore commented 3 years ago

If you are comfortable with the API, then you can manually adjust the volume of sound objects using the getMap/setMap calls and editing the JSON map data.

kantner commented 3 years ago

Uhh ... sounds great. Could you briefly explain how I can access this?

securitybore commented 3 years ago

You can get the documentation (such as it is) of the API here: https://www.notion.so/EXTERNAL-Gather-API-3bbf6c59325f40aca7ef5ce14c677444

If you invoke the getMap call you'll have the raw JSON data from the map. Put it into a text editor and you'll see where you can adjust the volume.