workadventure / workadventure

A collaborative web application (virtual office) presented as a 16-bit RPG video game
https://workadventu.re
4.07k stars 611 forks source link

Enhanced Sound Manager #2950

Open Nolway opened 1 year ago

Nolway commented 1 year ago

Currently, sounds is played in 2 different ways:

Another thing linked to that, the sound controller bar is always displayed on maps with sounds from map properties (not with sounds provided by the scripting API, check this issue: https://github.com/thecodingmachine/workadventure/issues/2910), the sound bar doesn't really work on IOS devices, it occupies too much space on mobile devices and I think isn't the good way to control sounds inside the app.

Finally, I think many kinds of sounds can be played inside a map (music, announcements, chatting sounds, ambient), and it'll be very cool to be able to manage the volume separately.

To summarize, the goals of this modification are to centralize the sound management, get more space on mobile devices, and patch a bug in the scripting API.

Proposal :

moufmouf commented 1 year ago

A kind of like this idea. There is maybe one thing missing: the ability to mute a sound/music with one click.

Right now, some maps (like Christmas maps) have a music that is played in the background. It is great to be able to turn that music off easily (i.e. without going to the settings). But this only make sense for musics. I mean, for a simple "pop" sound, we don't want a "mute" button to appear for 0.2 seconds.

So I guess we also need to dynamically add a "mute" button in the action bar when a "sound" property is used on the map.