メインコンテンツまでスキップ

playSound

Browser Only

This can only be used in code which runs in Dashboards and Graphics.

playSound(cueName, *opts) → {Object|undefined} (SoundJS AbstractAudioInstance)

Plays the sound cue of the provided cueName in the current bundle. Does nothing if the cue doesn't exist or if the cue has no assigned file to play.

Parameters

NameTypeAttributesDescription
cueNameStringSound cue's name
optsObject<optional>Options for the sound cue

Opts

NameTypeAttributesDefaultDescription
updateVolumeboolean<optional>trueWhether or not to let NodeCG automatically update this instance's volume when the user changes it on the dashboard.