Skip to content

CutMediaSound beta ​

Interface of @v12-engine/client

ts
export interface CutMediaSound

A page's <video> (or <audio>) heard through the game's sound (CN52): its element's sound, as Web Audio has it, through nodes of code's own (insert) and its volume (gain) to a bus, so that the player's volumes and mute are its. What a clip of the video lane is heard through (CutVideo.sound), where the stage has sound

element → source → (what code put in: insert) → gain → bus

Members ​

bus ​

ts
readonly bus: Bus;

The bus the media is heard through

context ​

ts
readonly context: BaseAudioContext;

The Web Audio context the media sound is made in

gain ​

ts
readonly gain: GainNode;

Its volume (volume): what goes to the bus

insert ​

ts
insert(input: AudioNode, output?: AudioNode): () => void;

Puts nodes of one's own in its chain, before its volume (one node, or a chain of them from input to output). What it gives back takes them out again; they are taken out as the element is heard for another clip

source ​

ts
readonly source: MediaElementAudioSourceNode;

The element's sound: made once for it and kept with it (an element is heard through one only)

volume ​

ts
volume(level: number, seconds?: number, ease?: (k: number) => number): void;

Its volume, eased there over seconds along ease (straight when left out)