Interface: PlaylistEntry
Defined in: packages/player/src/specs/mpv-client.nitro.ts:223
One entry of mpv's playlist, as read from the playlist node property.
Remarks
mpv 0.41.0 input.rst documents the node this is built from verbatim:
MPV_FORMAT_NODE_ARRAY
MPV_FORMAT_NODE_MAP (for each playlist entry)
"filename" MPV_FORMAT_STRING
"current" MPV_FORMAT_FLAG (might be missing; since mpv 0.7.0)
"playing" MPV_FORMAT_FLAG (same)
"title" MPV_FORMAT_STRING (optional)
"id" MPV_FORMAT_INT64
Only the three fields that identify an entry are carried across the bridge.
title is deliberately not: it is "available if the playlist file contains
such fields […] or if the playlist entry has been opened before", i.e. it is
undefined for every entry the user has not reached yet, which makes it a
trap rather than a feature. The now-playing title lives in PlayerState.title
and the full tag store behind Player.getMetadata().
Properties
current
readonly current: boolean;
Defined in: packages/player/src/specs/mpv-client.nitro.ts:249
playlist/N/current — "yes/true if the playlist-current-pos property
points to this entry" (input.rst).
The field "might be missing" on an entry mpv has never selected, which
native reads as false.
entryId
readonly entryId: number;
Defined in: packages/player/src/specs/mpv-client.nitro.ts:241
playlist/N/id — mpv's own entry id, "unique for the entire life time of
the current mpv core instance" (input.rst).
This is the identity that survives playlist-move, playlist-remove and
playlist-shuffle; the array position does not. It is the same id space as
PrefetchStartedEvent.entryId.
uri
readonly uri: string;
Defined in: packages/player/src/specs/mpv-client.nitro.ts:232
playlist/N/filename — the logical URI, i.e. the exact string that was
passed to loadfile.
A source resolver rewrites stream-open-filename on the way to the stream
layer and never touches the playlist, so this stays the key an app's queue
is built on no matter how many times the entry has been resolved.