Diorama

Made for a big screen.

This site is one 3D scene, built for a computer: a wide window and a mouse. Open dioramajs.dev on a desktop or a laptop to see it.This site is one 3D scene, built for a wide window. Make this one wider, or open dioramajs.dev on a larger screen.

GitHub

DioramaDocs

@dioramajs/diorama/audio/graph

One audio graph per page, shared by the audio effects and copies of them.

View as Markdown
import { audio, check, local } from '@dioramajs/diorama/audio/graph'

Functions

audioThe page's context, made on first use; undefined without Web Audio.
checkWhether the element's sound survives the graph. A URL of the page's origin is asked for once: in `same-origin` mode any redirect to another origin fails, just as it taints the element's own request. A server without HEAD gets a GET for the first byte.
localWhether Web Audio can read the element without muting it, as far as the page can tell without a request: true, false, or undefined for a URL of the page's own origin, which a redirect may take elsewhere, and for an element without a source yet.
routedThe element's sound already goes through the graph.
runningResolves true once the context runs, false if the signal aborts first. A suspended context would route a connected element to silence, so nothing connects before it runs.
sourceThe element's source. The first call takes the element's sound into the graph for good (the browser allows one source per element), so the source goes to the output at once and stays connected; analysers come and go beside it.
sourceOfThe URL the element plays: its current source, else `src`, else its first `<source>`.
wakeAsks a suspended context to run again, as a new play may allow.