matrix-react-sdk
Version:
SDK for matrix.org using React
27 lines (26 loc) • 853 B
TypeScript
import { SimpleObservable } from "matrix-widget-api";
import { IDestroyable } from "../utils/IDestroyable";
export declare class PlaybackClock implements IDestroyable {
private context;
private clipStart;
private stopped;
private lastCheck;
private observable;
private timerId;
private clipDuration;
constructor(context: AudioContext);
get durationSeconds(): number;
set durationSeconds(val: number);
get timeSeconds(): number;
get liveData(): SimpleObservable<number[]>;
private checkTime;
/**
* Mark the time in the audio context where the clip starts/has been loaded.
* This is to ensure the clock isn't skewed into thinking it is ~0.5s into
* a clip when the duration is set.
*/
flagLoadTime(): void;
flagStart(): void;
flagStop(): void;
destroy(): void;
}