blockly > WorkspaceAudio > play

WorkspaceAudio.play() method

Play a named sound at specified volume. If volume is not specified, use full volume (1).

Signature:

play(name: string, opt_volume?: number): void;

Parameters

Parameter Type Description
name string Name of sound.
opt_volume number (Optional) Volume of sound (0-1).

Returns:

void