UNPKG

react-udux-player

Version:

A customizable music player for React applications

20 lines (19 loc) 474 B
import type { PlayerContextType } from "../types"; /** * Hook to access the Uudux player context * * @returns The Udux player context * @throws Error if used outside of a SpotifyPlayerProvider * * @example * ```tsx * const { currentTrack, isPlaying, togglePlay } = useSpotifyPlayer(); * * return ( * <button onClick={togglePlay}> * {isPlaying ? 'Pause' : 'Play'} * </button> * ); * ``` */ export declare const useUduxPlayer: () => PlayerContextType;