Reference · Tile and table elements
setPageSoundsfunction
Give every element on the page another player for its sounds: a page's own, or a test's stand-in that only records
what was asked. Pass null to go back to the package's own, made again when next needed.
Import it
import { setPageSounds } from "@johnmorrisdotca/jarajara/element";
Definition
function setPageSounds(next: TileSounds | null): void
Parameters
| Name | Type | Description |
|---|---|---|
next | TileSounds | null | The page sound handle, or null to clear and close it. |
Examples
import { createTileSounds } from "@johnmorrisdotca/jarajara/tile-sounds";
import { setPageSounds } from "@johnmorrisdotca/jarajara/element";
const sounds = createTileSounds({muted:true,window:null});
setPageSounds(sounds);
setPageSounds(null);
console.log(sounds.muted);trueWhat it prints (run when this page was built)