fantasycalendar / FoundryVTT-Sequencer

This module implements a basic pipeline that can be used for managing the flow of a set of functions, effects, sounds, and macros.
Other
47 stars 24 forks source link

[REQUEST] - Don't play sound effects from modules that are not installed #211

Open shemetz opened 10 months ago

shemetz commented 10 months ago

Is your feature request related to a problem? Please describe. Me and other users from the PF2E community use the PF2E Animations module, which includes several built-in sequences that include sounds from soundfxlibrary, a package that includes some sounds. Since the sounds are not required for the animations to function, that package is not considered a dependency of PF2E Animations. However, users who don't install that package still run code that tries to fetch sounds from that package, leading to the console being full of these errors:

image

Each time such a sound is supposed to be played, the browser fails to access the file at modules/soundfxlibrary/xxxxxxxx, and prints two console errors.

Describe the solution you'd like I would like the Sequencer module to test each sound's file, and not attempt to play the sound if the file does not exist. This failure should be silent (unless perhaps configured otherwise in the settings).

I don't need Sequencer to test every single file; but the problem would be completely alleviated if Sequencer only tests files that are specifically under the soundfxlibrary module. It can be generalized by testing the files inside any module of any name.

The test doesn't need to check if the file exists; it's enough to get the (possible) module name from the file URL, then check if such a module is installed.

Obviously, this should still apply if such modules are disabled (but still installed). It can also potentially be extended for other files that are used by Sequencer, such as token images (I don't actually know what else).

Describe alternatives you've considered The developer of PF2E Animations agreed that they could make the change on their side too, for soundfxlibrary in particular, but making the change in Sequencer would likely be both easier and helpful to more people.