/** * Returns whether the current media is a **live stream**. * * This hook provides a reactive way to observe and respond to changes in the player’s * **live state** — i.e., whether the current playback represents a live stream or * a video-on-demand (VOD) asset. * * - **VOD:** Returns `false`. Playback has a fixed duration, from `0` to `duration`. * - **LIVE:** Returns `true`. Playback is tied to a live stream or broadcast that may * have a moving playback window (e.g., DVR or time-shifted playback). * * ⚠️ Must be used within a {@link PlayerProvider} or * [AVPlayerViewControllerProvider](../../ios-avplayerviewcontroller-plugin-api/variables/AVPlayerViewControllerProvider.md) component. * * @returns `boolean` **true** if the current media is live, otherwise **false**. * * @example * ```tsx * import React from 'react'; * import { View, Text } from 'react-native'; * import { useLive } from '@castlabs/react-native-prestoplay'; * * export default function StreamTypeIndicator() { * const isLive = useLive(); * * return ( * * {isLive ? 'Live Stream' : 'Video on Demand'} * * ); * } * ``` * * @group Hooks */ export default function useLive(): boolean;