TeaWeb/shared/backend/audio.d.ts

35 lines
1.1 KiB
TypeScript
Raw Normal View History

declare namespace audio {
export namespace player {
export function initialize() : boolean;
export function initialized() : boolean;
export function context() : AudioContext;
export function get_master_volume() : number;
export function set_master_volume(volume: number);
export function destination() : AudioNode;
export function on_ready(cb: () => any);
export function available_devices() : Promise<Device[]>;
export function set_device(device_id: string) : Promise<void>;
export function current_device() : Device;
export function initializeFromGesture();
}
export namespace recorder {
export function devices() : InputDevice[];
export function device_refresh_available() : boolean;
export function refresh_devices() : Promise<void>;
export function create_input() : AbstractInput;
2019-08-21 12:45:17 +02:00
export function create_levelmeter(device: InputDevice) : Promise<LevelMeter>;
}
2020-03-18 23:00:24 +01:00
export namespace sounds {
2020-03-18 23:32:17 +01:00
export function play_sound(file: sound.SoundFile) : Promise<void>;
2020-03-18 23:00:24 +01:00
}
}