interface UsePlayFileResult

Returned by usePlayFile to the views that play an uploaded file.

Properties

fileUrl: string

The file's URL, with the viewer's media token, as the player loads it.

active: boolean

True while the file is the player's current item, playing or paused.

playing: boolean

True while the file is playing.

toggle: () => void

Plays the file from the start, or pauses and resumes it once it is the player's current item, so a second click doesn't restart it.

Usage

import { type UsePlayFileResult } from "src/hooks/player/usePlayFile.ts";