googlevideo / exports/sabr-streaming-adapter / SabrUmpProcessor
Class: SabrUmpProcessor
Defined in: codeberg/googlevideo/src/core/SabrUmpProcessor.ts:47
This class is responsible for reading a UMP stream, handling different part types (like media headers, media data, and server directives), and populating a metadata object with the extracted information. It is supposed to be used in conjunction with a SabrPlayerAdapter
in video player implementations.
Constructors
Constructor
new SabrUmpProcessor(
requestMetadata
,cacheManager?
):SabrUmpProcessor
Defined in: codeberg/googlevideo/src/core/SabrUmpProcessor.ts:68
Parameters
requestMetadata
cacheManager?
Returns
SabrUmpProcessor
Properties
partialPart?
optional
partialPart:Part
Defined in: codeberg/googlevideo/src/core/SabrUmpProcessor.ts:48
Methods
getSegmentInfo()
getSegmentInfo():
undefined
|Segment
Defined in: codeberg/googlevideo/src/core/SabrUmpProcessor.ts:106
Returns
undefined
| Segment
processChunk()
processChunk(
value
):Promise
<undefined
|UmpProcessingResult
>
Defined in: codeberg/googlevideo/src/core/SabrUmpProcessor.ts:78
Processes a chunk of data from a UMP stream and updates the request context.
Parameters
value
Uint8Array
Returns
Promise
<undefined
| UmpProcessingResult
>
A promise that resolves with a processing result if a terminal part is found (e.g., MediaEnd), or undefined otherwise.