StageAudio beta
Interface of @v12-engine/client
export interface StageAudioWhat the stage's sound is to a cinematic: music set and its tracks now, its own volume, a sound played (shaped as SoundPlay says, and held while it plays: what code reaches of it, where the stage gives one), a bus's volume over the player's, the music as code reaches it, a video heard through it
Members
media
media?(element: HTMLMediaElement, bus: Bus): CutMediaSound | undefined;A <video> of the page heard through the stage's sound, on bus (CN52): what a clip of the video lane is heard through, the same for an element each time. None where the stage does not (the element's own volume, then)
music
music(tracks: string[], options: {
crossfade?: number;
volume?: number;
}): void;Sets the music to the tracks given, with the crossfade seconds and volume from the options
musicNow
musicNow(): string[];Returns the tracks of the music playing now
musicVolume
musicVolume(level: number, seconds: number): void;Sets the music's volume to level over seconds
play
play(name: string, options: SoundPlay): CutSound | undefined | void;Plays a sound by name as options shape it; returns its handle where the stage gives one
playingMusic
playingMusic?(): CutMusic | undefined;The music playing, its element and nodes: none for none, or where the stage does not say
scale
scale(bus: Bus, level: number, seconds: number): void;Sets a bus's volume over the player's to level, reached in seconds
seconds
seconds?(name: string): number | undefined;How long a sound is, in seconds, once it is loaded (the cinematic's voices are, before it plays): nothing where the stage does not know (campaign plan CI2)