Audio resources created in advance can act in conjunction with control elements. For example, a sound can be played when a button is clicked.
To do this, select the control element (in this case a button) and create a new click event under “Actions” in the element properties.

Select “PLAY_AUDIO” as the command.
You then specify which audio file should be played when you click the button.


Audio resources in connection with alarm variables
It also makes sense to use sounds in conjunction with alarms. This allows you to make an alarm variable work with an audio file.
This only requires one click. If you create a new alarm variable, you can already assign a sound to the variable in the creation dialog.


Audio resources in browser runtime mode
If you run a project in the browser that contains audio resources, you may first have to activate the
authorization to play sounds in the browser settings. Due to some guidelines, the automatic playback of sounds in the browser is prevented.
However, sounds that are only activated when the user actively triggers them are not blocked. For example, if the user triggers a button by clicking
, which in turn triggers the sound. The purpose of this is to prevent
sounds (music, effects, etc…) from all starting to play at the same time when several websites are opened.
In QuickHMI runtime mode, however, this is often intentional, as alarms with stored signal tones, for example, must activate automatically as soon as an alarm is triggered by a fault or error, for example.
To authorize the browser to play sounds automatically, proceed as follows:
The following example refers to Google Chrome version 129.0.6668.90 For other browsers or future Google Chrome versions, the procedure may differ from this example! procedure may differ from this example!
If a sound is to be played and authorization has not yet been granted, the following message appears in the browser:


Now you can click on “Confirm”so that the sound can be played back.
To ensure that your browser can generally play sounds without requesting authorization again, proceed as follows in the browser settings:
Settings / Privacy and security / Additional content settings / Sound / Websites must not play sound — Activate >



You can also decide directly which websites may and may not allow the automatic playback of sounds. To do this, click on“Add” and insert the relevant URL.

