You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I worked up typescript typings for this component, but I'm having some temporary trouble getting them into DefinitelyTyped. Posting them here in the interim for others to steal until I get that worked out. Note the onVolumeChanged spelling, which is probably a cosmetic bug in react-audio-player.
declare module 'react-audio-player'{import{Component,HTMLProps,Ref,SyntheticEvent}from'react';typeOmit<T,KextendskeyofT>=Pick<T,Exclude<keyofT,K>>;exportinterfaceReactAudioPlayerPropsextendsOmit<HTMLProps<HTMLAudioElement>,"ref">{autoPlay?: boolean;children?: Element[];className?: string;controls?: boolean;crossOrigin?: string;controlsList?: string;id?: string;loop?: boolean;muted?: boolean;volume?: number;preload?: ''|'none'|'metadata'|'auto';src?: string;style?: {};ref?: Ref<ReactAudioPlayer>;listenInterval?: number;onListen?: (currentTime: number)=>void;// HTMLProps has onVolumeChange (not past tense). This covers the// alternate spelling used by this component.onVolumeChanged?: (e: SyntheticEvent<HTMLAudioElement,Event>)=>void;}exportdefaultclassReactAudioPlayerextendsComponent<ReactAudioPlayerProps,any>{readonlyaudioEl: HTMLAudioElement;}}
If you don't care about typescript you can close this out right away. It should be findable with a quick search regardless.
The text was updated successfully, but these errors were encountered:
I worked up typescript typings for this component, but I'm having some temporary trouble getting them into DefinitelyTyped. Posting them here in the interim for others to steal until I get that worked out. Note the onVolumeChanged spelling, which is probably a cosmetic bug in react-audio-player.
If you don't care about typescript you can close this out right away. It should be findable with a quick search regardless.
The text was updated successfully, but these errors were encountered: