Skip to content

AudioPlugin

Defined in: audio/src/AudioPlugin.ts:16

  • Plugin

new AudioPlugin(config?): AudioPlugin

Defined in: audio/src/AudioPlugin.ts:26

AudioConfig

AudioPlugin

readonly name: "audio" = "audio"

Defined in: audio/src/AudioPlugin.ts:17

Unique plugin name.

Plugin.name


readonly version: "2.0.0" = "2.0.0"

Defined in: audio/src/AudioPlugin.ts:18

Semantic version string.

Plugin.version

install(context): Promise<void>

Defined in: audio/src/AudioPlugin.ts:35

Importing @yagejs/audio needs no browser: the audio library it plays through is loaded here, when the plugin installs. Sounds registered with registerSound before that are added to the library at the same point.

EngineContext

Promise<void>

Plugin.install


onDestroy(): void

Defined in: audio/src/AudioPlugin.ts:103

Called when the engine is destroyed.

void

Plugin.onDestroy

Coding agents: fetch https://yage.dev/llms.txt first and prefer the Markdown references it links over these HTML pages. This page's Markdown counterpart is /llms/packages/audio.md.