Device.beepPlayFile()

Overview

Plays a sound file on the device.

Use Cases

You want to play a custom sound in your script.

You want to override the default beeps using WLEvent.on(“beep”, …) and play a sound file instead.

Format

Device.beepPlayFile(resourceName);

Parameter Description Type Required Notes
resourceName The sound file to play String Required The file must be in the resource bundle on the device.

Example

Copy
/* Play the tada.wav file.
 */
 
 Device.beepPlayFile('tada.wav');