/// declare module AudioPlayr { /** * Lookup for directories to the sounds contained within. */ export interface ILibrarySettings { [i: string]: string[]; } /** * Lookup for HTMLAudioElements keyed by their names. */ export interface ISoundsLibrary { [i: string]: HTMLAudioElement; } /** * Lookup for directories of sounds to their sound libraries. */ export interface IDirectoriesLibrary { [i: string]: ISoundsLibrary; } /** * Settings to initialize a new instance of an IAudioPlayr. */ export interface IAudioPlayrSettings { /** * The names of the audio files to be preloaded for on-demand playback. */ library: ILibrarySettings; /** * The directory in which all sub-directories of audio files are stored. */ directory: string; /** * The allowed filetypes for each audio file. Each of these should have a * directory of their name under the main directory, which should contain * each file of the filetype. */ fileTypes: string[]; /** * A storage container to store mute/volume status locally. This can be * either a ItemsHoldr or localStorage equivalent. */ ItemsHolder: ItemsHoldr.IItemsHoldr | Storage; /** * A String or Function to get the default theme for playTheme calls. * Functions are called for a return value, and Strings are constant * (defaults to "Theme"). * */ getThemeDefault?: string | { (...args: any[]): string }; /** * A Number or Function to get the "local" volume for playLocal calls. * Functions are called for a return value, and Numbers are constant * (defaults to 1). * */ getVolumeLocal?: number | { (...args: any[]): number }; } /** * An audio library to automate preloading and controlled playback of multiple * audio tracks, with support for different browsers' preferred file types. */ export interface IAudioPlayr { /** * @returns The listing of