Skip to main content

Function: metadataKeyProperty()

function metadataKeyProperty(index: number): string;

Defined in: packages/player/src/properties.ts:255

The property that yields the key of the index-th metadata entry.

mpv 0.35.1 input.rst: "metadata/list/N/key — Key name of the Nth metadata entry. (The first entry is 0)." It is a plain string sub-property (player/command.c, get_tag_entrySUB_PROP_STR), which makes the tag map reachable one scalar at a time.

Player.getMetadata no longer walks these — it does one node read of metadata instead, because 2N + 1 blocking reads at a track boundary is a JS-thread stall. They stay public because a caller who wants exactly one entry by position still has no other way to ask.

Parameters

ParameterTypeDescription
indexnumber0-based entry index, < metadata/list/count.

Returns

string