Plays the sound file passed as parameter on the front-end platform.


ui.Interface.frontCall("standard", "playSound",
  [ resource [, wait ] ], [])
  1. resource - The sound file to play. This must be a local sound file or a URI the can be loaded by the front-end.
  2. wait - When FALSE, front call returns immediately. If TRUE, the front call returns when sound has finished playing. Default is TRUE.


The "playSound" front call opens the sound file/resource passed as parameter and plays the sound on the front-end.

Supported sound file format depends on the front-end infrastructure (platform, technology, web browser, etc.)

The sound file must be located on the front-end platform, or be a URI that can be loaded by the front-end.

Sound files provided by URIs that take the form of http or https URLscan exist on the Web or on a private HTTP server. It is also possible to provide a URI generated by the ui.Interface.filenameToURI() method, from the file located on the application server where fglrun executes.

When using a file name, it can be an absolute or relative path. In a client/server front-end configuration, if the sound file is located on the application server, it is in charge of the program to transfer the file on the front-end platform.

When executing an app on a mobile device, if it is not an absolute path, the sound file path is relative to the appdir.

When specifying a file path, pay attention to platform specific rules regarding directory separators and space characters in filenames. When the front-end executes on a recent Microsoft™ Windows™ system, you can use the / slash character as directory separator, like on Unix systems. A directory or filename can contain spaces, and there is no need to surround the path with double quotes in such case. When using backslash directory separators, make sure to escape backslash characters in string literals with \\.

The wait parameter is optional. Specify FALSE, to return immediately from the front call, or TRUE, to wait until the sound has finished playing. When the wait parameter is not specified, it defaults to TRUE.


CALL ui.Interface.frontCall("standard", "playSound", ["beep.mp3",FALSE], [])