Velocity API: Device.beepPlayFile()

Version 2

    Return To Index

    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);
    ParameterDescriptionTypeRequiredNotes
    resourceNameThe sound file to playStringRequiredThe file must be in the resource bundle on the device.

     

    Example

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