5.2.3 • Published 6 months ago
@types/react-howler v5.2.3
Installation
npm install --save @types/react-howler
Summary
This package contains type definitions for react-howler (https://github.com/thangngoc89/react-howler).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react-howler.
index.d.ts
// Type definitions for react-howler 5.2
// Project: https://github.com/thangngoc89/react-howler
// Definitions by: Danijel Maksimovic <https://github.com/maksimovicdanijel>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 3.2
import * as React from 'react';
import { Howl, HowlOptions, HowlCallback, HowlErrorCallback } from 'howler';
declare enum HOWLER_STATE {
UNLOADED = 'unloaded',
LOADING = 'loading',
LOADED = 'loaded',
}
export { HowlCallback, HowlErrorCallback };
export interface PropTypes {
src: HowlOptions['src'];
preload?: boolean | undefined;
playing?: boolean | undefined;
loop?: HowlOptions['loop'];
mute?: HowlOptions['mute'];
volume?: HowlOptions['volume'];
rate?: HowlOptions['rate'];
html5?: HowlOptions['html5'];
format?: HowlOptions['format'];
xhr?: HowlOptions['xhr'] | undefined;
onPlay?: HowlCallback | undefined;
onPause?: HowlCallback | undefined;
onVolume?: HowlCallback | undefined;
onStop?: HowlCallback | undefined;
onLoad?: HowlCallback | undefined;
onLoadError?: HowlErrorCallback | undefined;
onEnd?: HowlCallback | undefined;
onSeek?: HowlCallback | undefined;
onPlayError?: HowlErrorCallback | undefined;
}
declare class ReactHowler extends React.Component<PropTypes> {
stop(id?: number): void;
duration(id?: number): number;
seek(time?: number): number;
howlerState(): HOWLER_STATE;
howler: Howl;
}
export default ReactHowler;
Additional Details
- Last updated: Mon, 07 Mar 2022 09:31:42 GMT
- Dependencies: @types/react, @types/howler
- Global values: none
Credits
These definitions were written by Danijel Maksimovic.