function dumpFiguresFor
dumpFiguresFor(
playlist: Pick<Playlist, "userId">,
viewerId: string | null | undefined
):
Required<Pick<Playlist, "dumpCount">>
& Pick<Playlist, "lastDumpAt">

Returns what playlist says of its dumps to the viewer, members being all of them: the dumpCount and lastDumpAt that VISIBLE_DUMP_FIGURES reads in a query. The WebSocket service puts them on the playlist each socket is sent.

Parameters

playlist: Pick<Playlist, "userId">
viewerId: string | null | undefined

Return Type

Required<Pick<Playlist, "dumpCount">>
& Pick<Playlist, "lastDumpAt">

Usage

import { dumpFiguresFor } from "api/lib/playlist-members.ts";