Something went wrong. Try again.
[READ-ONLY] Mirror of https://github.com/excaliburjs/Excalibur. 🎮 Your friendly TypeScript 2D game engine for the web 🗡️ excaliburjs.com
excalibur excaliburjs game-development game-engine game-framework gamedev games html5-canvas typescript
Something went wrong. Try again.
875 B · 38 lines
TypeScript
123456789101112131415161718192021222324252627282930313233343536373839import type { Audio } from './audio';
export type ExResponseType = '' | 'arraybuffer' | 'blob' | 'document' | 'json' | 'text';
export interface ExResponseTypesLookup { [name: string]: ExResponseType;}
export class ExResponse { public static type: ExResponseTypesLookup = { any: '', blob: 'blob', json: 'json', text: 'text', document: 'document', arraybuffer: 'arraybuffer' };}
/** * Represents an audio implementation like {@apilink WebAudioInstance} */export interface AudioImplementation { /** * XHR response type */ responseType: ExResponseType;
/** * Processes raw data and transforms into sound data */ processData(data: Blob | ArrayBuffer): Promise<string | AudioBuffer>;
/** * Factory method that returns an instance of a played audio track */ createInstance(data: string | AudioBuffer): Audio;}