CutMediaSound beta
Interface of @v12-engine/client
export interface CutMediaSoundA 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
readonly bus: Bus;The bus the media is heard through
context
readonly context: BaseAudioContext;The Web Audio context the media sound is made in
gain
readonly gain: GainNode;Its volume (volume): what goes to the bus
insert
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
readonly source: MediaElementAudioSourceNode;The element's sound: made once for it and kept with it (an element is heard through one only)
volume
volume(level: number, seconds?: number, ease?: (k: number) => number): void;Its volume, eased there over seconds along ease (straight when left out)