Skip to main content

Home > blockly > WorkspaceAudio

WorkspaceAudio class

Class for loading, storing, and playing audio for a workspace.

Signature:

export declare class WorkspaceAudio 

Constructors

ConstructorModifiersDescription
(constructor)(parentWorkspace)Constructs a new instance of the WorkspaceAudio class

Methods

MethodModifiersDescription
getMuted()
load(filenames, name)Load an audio file. Cache it, ready for instantaneous playing.
play(name, opt_volume)Play a named sound at specified volume. If volume is not specified, use full volume (1).
setMuted(muted)