Constructor
new IlstUtils()
- Implements:
- Source:
Members
ILST_TO_ID3_ :Map<string, string>
Maps iTunes ILST four-char codes to their ID3v2 equivalents.
Type:
- Map<string, string>
- Source:
Methods
parse(datanon-null) → {Array<!shaka.extern.MetadataFrame>}
Parses {@code data} and returns every metadata frame found in it.
Implementations MUST:
- Return an empty array (never {@code null}) when no frames are found or the data is not recognised.
- Not throw; all errors should be swallowed and result in an empty or partial return value.
- Use ID3v2.4 four-character frame IDs as {@code key} values wherever a mapping exists (see class-level documentation).
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Uint8Array | Raw bytes of the media segment or file. |
- Implements:
- Source:
Returns:
- Type
- Array<!shaka.extern.MetadataFrame>
parseDataBox_(boxnon-null, keyopt) → {{data: (string|number|ArrayBuffer), mimeType: ?string, pictureType: ?number}}
Parses a MP4 ILST `data` sub-box.
The Mp4Parser fullBox handler already consumed version (1 byte) and
flags (3 bytes) before invoking this callback, so `box.reader` starts
immediately after those 4 bytes.
Remaining payload layout:
- 4 bytes reserved (always 0x00000000)
- remaining bytes = actual value
`box.flags` contains the iTunes type indicator:
- 1 : UTF-8 text
- 13 : JPEG image
- 14 : PNG image
- 21 : Big-endian signed integer
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
box |
shaka.extern.ParsedBox | ||
key |
string |
<optional> |
Original ILST four-char code, used for trkn/disk. |
- Source:
Returns:
- Type
- {data: (string|number|ArrayBuffer), mimeType: ?string, pictureType: ?number}
parseFreeform_(datanon-null) → {shaka.extern.MetadataFrame}
Parses Apple freeform metadata (---- box).
Parameters:
| Name | Type | Description |
|---|---|---|
data |
Uint8Array |
- Source:
Returns:
parseStandard_(key, datanon-null) → {shaka.extern.MetadataFrame}
Parses standard ILST atoms (non-freeform).
Parameters:
| Name | Type | Description |
|---|---|---|
key |
string | |
data |
Uint8Array |
- Source: