import type { ICorePlaybackObservation } from "../../main_thread/init/utils/create_core_playback_observer"; import type Manifest from "../../manifest/classes"; import type { IManifestLoader, IRepresentationFilter, ISegmentLoader } from "../../public_types"; import type SegmentSinksStore from "../segment_sinks"; import type { ISentError } from "../types"; /** * "Plugins" are a specific kind of API where an application can define complex * functions that the RxPlayer will call in some normally-core aspects of media * playback: e.g. loading segments. * * This interface lists them. */ export interface ICorePlugins { representationFilters: Map; segmentLoaders: Map; manifestLoaders: Map; } /** * Format an error, which may be of any form, into an Object than can easily be * serialized - e.g. to be communicated through a postMessage-like API. * @param {*} error - The error to serialized * @returns {Object} - A serialization-safe error format */ export declare function formatErrorForSender(error: unknown): ISentError; /** * Synchronize SegmentSinks with what has been buffered. * @param {Object} observation - The just-received playback observation, * including what has been buffered on lower-level buffers * @param {Object} segmentSinksStore - Interface allowing to interact * with `SegmentSink`s, so their inventory can be updated accordingly. */ export declare function synchronizeSegmentSinksOnObservation(observation: ICorePlaybackObservation, segmentSinksStore: SegmentSinksStore): void; /** * Set Representation.isCodecSupportedInWebWorker to true or false * If the codec is supported in the current context. * If MSE in worker is not available, the attribute is not set. */ export declare function updateCodecSupportInWorkerMode(manifestToUpdate: Manifest): void; /** * Some functions may be defined by the API, we call those "plugins". * This function parses and extract the actual function from the different * ways an application can provide it to us. * @param {Object} input - The API input * @param {Object} corePlugins - Context on what identified functions are * defined right now. * @returns {Function} */ export declare function extractExternalPlugins(input: { manifestLoader: { fn?: IManifestLoader | undefined; workerId?: string | undefined; } | undefined; segmentLoader: { fn?: ISegmentLoader | undefined; workerId?: string | undefined; } | undefined; representationFilter: undefined | { fn?: IRepresentationFilter | undefined; eval?: string | undefined; workerId?: string | undefined; }; }, corePlugins: ICorePlugins): { manifestLoader: IManifestLoader | undefined; segmentLoader: ISegmentLoader | undefined; representationFilter: IRepresentationFilter | undefined; }; //# sourceMappingURL=utils.d.ts.map