import Player from '../player/Player'; /** * Returns the current {@link Player} instance, allowing direct control over media playback. * * This hook provides access to the active {@link Player} object, which exposes * methods for controlling playback — such as `play()`, `pause()`, and `replay()`. * * ⚠️ Must be used within a {@link PlayerProvider} or * [AVPlayerViewControllerProvider](../../ios-avplayerviewcontroller-plugin-api/variables/AVPlayerViewControllerProvider.md) component. * * Typically used together with other player-related hooks for complete playback management: * - {@link usePlayerState} – provides the current playback state (e.g., playing, paused, ended). * * @returns `Player` The active {@link Player} instance. * * @example * ```tsx * const player = usePlayer(); * const playerState = usePlayerState(); * * const onPress = useCallback(() => { * if (playerState === PlayerState.Ended) { * player?.replay(); * } * }, [player, playerState]); *``` * * @group Hooks */ export default function usePlayer(): Player;