Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions modules/music/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public override async __run(ctx: Context): Promise<void> {
}
```

Music starts muted. Call `ctx.music.mute()` once to unmute it.

Call `ctx.music.mute()` to toggle the muted state of every loaded track. `play` throws `NfNotFound` when the given key was never loaded.

## Links
Expand Down
2 changes: 2 additions & 0 deletions modules/music/src/music.library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import type { MusicContextApi } from "./music-context.type";
* Manages a collection of named `HTMLAudioElement` instances and ensures
* only one track plays at a time — unlike `SoundLibrary`, starting a new
* track pauses whichever one was playing.
*
* Music starts muted. Call `mute()` once to unmute it.
*/
export class MusicLibrary extends Library implements EditorAwareLibrary {
readonly key = defineLibraryKey("music");
Expand Down
2 changes: 2 additions & 0 deletions modules/sound/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public override async __run(ctx: Context): Promise<void> {
}
```

Sound effects start muted. Call `ctx.sound.mute()` once to unmute them.

Call `ctx.sound.mute()` to toggle the muted state of every loaded sound effect. `play` throws `NfNotFound` when the given key was never loaded.

## Links
Expand Down
2 changes: 2 additions & 0 deletions modules/sound/src/sound.library.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import type { SoundContextApi } from "./sound-context.type";
* Manages a collection of named `HTMLAudioElement` instances. Load sounds
* with `load` and trigger playback with `play`. Unlike `MusicLibrary`,
* multiple sounds may overlap — there's no single-track exclusivity.
*
* Sound effects start muted. Call `mute()` once to unmute them.
*/
export class SoundLibrary extends Library implements EditorAwareLibrary {
readonly key = defineLibraryKey("sound");
Expand Down