function isStreamStale
isStreamStale(item: Extract<PlayerItem, { kind: "stream"; }>): boolean

Checks whether the signed URL of item is older than STREAM_STALE_MS. PlayerProvider refreshes a restored session's stream when it is, so that the first press of play doesn't stall.

Parameters

item: Extract<PlayerItem, { kind: "stream"; }>

Return Type

boolean

Usage

import { isStreamStale } from "src/utils/player/streamSources.ts";