TileSoundsOptionstype
How a table's sounds are made. Every field may be left out.
Import it
import type { TileSoundsOptions } from "@johnmorrisdotca/jarajara/tile-sounds";
Definition
type TileSoundsOptions = {
muted?: boolean;
volume?: number;
load?: () => Promise<{
TILE_SOUND_DATA: TileSoundData;
}>;
window?: TileSoundWindow | null;
};
Members
| Name | Type | Description |
|---|---|---|
muted (optional) | boolean | undefined | Start muted: nothing plays, and nothing is fetched, until |
volume (optional) | number | undefined | How loud, from 0 to 1. Unless said, 0.6. |
load (optional) | (() => Promise<{ TILE_SOUND_DATA: TileSoundData; }>) | undefined | Where the recordings come from: the package's own module unless another is handed in. |
window (optional) | TileSoundWindow | null | undefined | The window to make sound in: the page's own unless another is handed in (a test's, or none for silence). |
Examples
import type { TileSoundsOptions } from "@johnmorrisdotca/jarajara/tile-sounds";
const value: TileSoundsOptions = {muted:true,volume:0.5,window:null};
console.log(value);{ muted: true, volume: 0.5, window: null }What it prints (run when this page was built)