MediaStorePlayerSettings interface

Settings for Media Store playback see: NorskMediaStore.player()

Signature:

export interface MediaStorePlayerSettings extends InputSettings<MediaStorePlayerNode>, StreamStatisticsMixin

Properties

Property Type Description

cuts

MediaStoreCut[]

Required: The start times and durations of the playback

live?

{ awaitNextSessionMs?: number | "forever"; }

(Optional) Following the live edge (a last cut list entry with durationMs "live"): how long to wait at the end of a recording session (its recorder closed or restarted) for the next to record the entry’s streams before playback ends, in milliseconds; default 30000. "forever" waits until the player is closed. Playback joins the next session as sessionGap says, keeping as far behind the recording as it was: by default ("fill") the gap is held (up to holdMs) and then filled as it plays, until the next session comes or the wait ends. A sessionGap of "splice" joins it at once, or, where the session only starts after playback has reached the end of the last, as soon as it does. onSessionJoins tells of it.

mediaSpeed?

number

(Optional) Trick-play media-speed multiplier. Defaults to normal (1). Values greater than 1 fast-forward and values less than 1 slow-motion the media timeline (the frames' PTS/DTS are rewritten). Must be greater than 0. Pair with a downstream frame-rate-conversion node for clean constant-rate output; audio is dropped whenever the speed is not 1.

Assumes a forward, monotone playback: a backward media-time jump (a seek, or a repeated/looping cut) is not currently rebased by the trick-play retimer, so combining mediaSpeed != 1 with such playback is unsupported for now.

onEof?

() ⇒ void

(Optional) Callback to be notified when playback ends: at the end of the last cut list entry (one that follows the live edge does not end while the recording goes on), or at once when there is nothing to play. The player then closes.

onLiveEdge?

(state: MediaStoreLiveEdge) ⇒ void

(Optional) Following the live edge: where playback stands against the recording. Called when it reaches the live edge or falls behind it, every 5 s while it follows, and when it drops back to normal speed on catching up.

onSessionJoins?

(joins: MediaStoreSessionJoin[]) ⇒ void

(Optional) Callback with where playback joins recording sessions: called once as the player opens when it joins any, and again for each session it follows the live edge into

sessionGap?

MediaStoreSessionGap

(Optional) What to do with a cut whose range spans more than one recording session (a workflow restarted inside it, say). Each field left out is the player’s own default: "splice", holding gaps up to 1000ms, black; "fill" when its last cut list entry follows the live edge, a delayed playout keeping its delay through a recorder restart (see live). A store’s and the engine config’s sessionGap are for cuts, and do not apply here. A gap held or filled plays out in real time, so "fill" plays the whole time between the sessions.