Ramu.Utils.playsound - HermesPasser/Ramu GitHub Wiki
static bool
Ramu.Utils.playSound(sound, volume = null)
Parameters
audio
sound: Audio to be played.float
**volume **: Volume of the sound. (optional, default is null)
Return
bool
: Return true if the gameObj is inside of the canvas and false if not.
Description
Play a sound.
Note: this method is deprecated, use Ramu.Audio instead.
You can test this snippet of code here.
let trainSnd = new Audio("https://hermespasser.github.io/p/ramu/losttrain/res/steam-train-whistle-daniel_simon.wav");
Ramu.Utils.playSound(trainSnd);