Class SimpleMetadataSync<Meta, O>

convenience specialization of MetadataSync that doesn't transform the metadata

Type Parameters

  • Meta = unknown

  • O = unknown

Hierarchy

Constructors

Properties

Methods

Constructors

Properties

metadata?: Meta

user metadata for the last presented video frame

queue: default<Meta>
ready: Promise<void>

promise resolving when the metadata extractor is ready

Methods

  • called by requestVideoFrameCallback when the video element presents a new frame.

    the default implementation looks up the new metadata from the jitter buffer, transforms it with transformMetadata and updates metadata.

    this method can be overriden to gather stats.

    Parameters

    • _now: number
    • frameMetadata: VideoFrameCallbackMetadata

    Returns void

  • transform metadata after retrieval from the jitter buffer, if present for the current frame.

    this is a good place to do simple post-processing that would incur extra cost if done in the worker because of the extra serialization, such as accumulating prior metadata or deltas.

    Parameters

    • metadata: Meta

    Returns Meta

Generated using TypeDoc