Play sound by java

1
Hi, I have a form where the user puts a string in a text box. A microflow starts on change of the text box. This microflow will give a validation feedback to the form. The validation feedbacks are every time different. I want to play for every kind of validation feedback a different sound. Is this possible by a java action call in the microflow?
asked
2 answers
3

I would do this using a javascript widget. You could set up the widget to trigger a noise anytime there is some validation on the page.

See this for an example sound plugin for JQuery:

https://github.com/admsev/jquery-play-sound

Also see this example of listening to validation feedback in a Mendix widget:

https://github.com/mendix/AppStoreWidgetBoilerplate/blob/master/src/WidgetName/widget/WidgetName.js#L258

answered
1

Also see a custom widget I had built to play sounds:

GitHub Link

There's a test project in there. If I recall, you could show or hide a container with this widget in it to trigger the sound. I think you could use this widget directly by creating a few boolean attributes for the different sounds, putting this widget in a conditionally visible container based on those booleans, then triggering changes to those booleans in validation microflows.

answered