UNPKG

bitmovin-player-react-native

Version:

Official React Native bindings for Bitmovin's mobile Player SDKs.

75 lines 2.8 kB
/** * Enumerates all supported types of timed metadata entries. * * @see {@link MetadataEntry} for the full type narrowing documentation */ export var MetadataType; (function (MetadataType) { /** * ID3 metadata embedded in the media stream. * * Used for timed ID3 tags such as text frames, comments, artwork, * chapters, private frames, and other ID3v2 structures. * * @see {@link Id3MetadataEntry} */ MetadataType["ID3"] = "ID3"; /** * Event Message metadata as defined in ISO/IEC 23009-1. * * Represents MP4 Event Message boxes (`emsg`) or DASH `EventStream` * events carrying an application- or spec-defined payload. * * @platform Android * @remarks This metadata type is never emitted on iOS or tvOS, as the native * player does not surface EMSG events on those platforms. * @see {@link EventMessageMetadataEntry} */ MetadataType["EMSG"] = "EMSG"; /** * SCTE-35 signaling extracted from HLS `#EXT-X-SCTE35` tags. * * Typically used for ad insertion, blackout signaling, or other * broadcast-style cue messages. * * @see {@link ScteMetadataEntry} */ MetadataType["SCTE"] = "SCTE"; /** * HLS `#EXT-X-DATERANGE` tags representing timed opportunities or annotations. * * Used for in-playlist markers such as interstitial opportunities, * blackout windows, content labels, or other time-bounded ranges. * * @see {@link DateRangeMetadataEntry} */ MetadataType["DATERANGE"] = "DATERANGE"; /** * Sentinel type for unsupported metadata. * * This value indicates that the underlying native player reported timed metadata * at some point in the stream, but the React Native SDK does not yet map it to * one of the supported metadata entry types of ({@link ID3}, {@link SCTE}, * {@link DATERANGE}, or {@link EMSG}). * * @see {@link UnsupportedMetadataEntry} */ MetadataType["Unsupported"] = "NONE"; })(MetadataType || (MetadataType = {})); /** * Type-safe narrowing helper for Android ID3 frame types. * * Android ID3 frames have 9 distinct frame types (text, binary, apic, url, comment, * priv, geob, chapter, chapterToc), each with different fields. This helper provides * type-safe access to frame-specific properties. * * @param entry - The ID3 metadata entry to check * @param frameType - The Android frame type to narrow to * @returns `true` if entry is an Android frame of the specified type * * @see {@link MetadataEntry} for the full type narrowing documentation */ export function isAndroidId3Frame(entry, frameType) { return entry.platform === 'android' && entry.frameType === frameType; } //# sourceMappingURL=metadata.js.map