blockly > WorkspaceAudio > load
WorkspaceAudio.load() method
Load an audio file. Cache it, ready for instantaneous playing.
Signature:
load(filenames: string[], name: string): void;
Parameters
Parameter | Type | Description |
---|---|---|
filenames | string[] | List of file types in decreasing order of preference (i.e. increasing size). E.g. ['media/go.mp3', 'media/go.wav'] Filenames include path from Blockly's root. File extensions matter. |
name | string | Name of sound. |
Returns:
void