Members
chunkSize :number
The main chunk size, in bytes.
Type:
- number
container :string
The container identifier.
'RIFF', 'RIFX' and 'RF64' are supported.
Type:
- string
format :string
The format identifier.
Type:
- string
(protected) head :number
Type:
- number
signature :Object|null
An object representing the signature of all chunks in the file.
Type:
- Object | null
(protected, non-null) supported_containers :Array.<string>
The list of supported containers.
Any format different from RIFX will be treated as RIFF.
Type:
- Array.<string>
(protected) uInt32 :Object
Type:
- Object
Methods
(protected) findChunk(chunkId, multiple) → {Object}
Find a chunk by its fourCC_ in a array of RIFF chunks.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
chunkId |
string | The chunk fourCC_. | |
multiple |
boolean |
false
|
True if there may be multiple chunks with the same chunkId. |
Returns:
- Type
- Object
(protected) readString(bytesnon-null, maxSize) → {string}
Read bytes as a string from a RIFF chunk.
Parameters:
Name | Type | Description |
---|---|---|
bytes |
Uint8Array | The bytes. |
maxSize |
number | the max size of the string. |
Returns:
The string.
- Type
- string
(protected) readUInt32(bytesnon-null) → {number}
Read a number from a chunk.
Parameters:
Name | Type | Description |
---|---|---|
bytes |
Uint8Array | The chunk bytes. |
Returns:
The number.
- Type
- number
(protected) setSignature(buffernon-null)
Read the signature of the chunks in a RIFF/RIFX file.
Parameters:
Name | Type | Description |
---|---|---|
buffer |
Uint8Array | The file bytes. |