Blob
What is a blob
Blob
stands for Binary Large Object
.
- high-level, file-like object that represents immutable, raw binary data.
Subtypes of blob
like AudioBlob
is a Blob
that contains audio data.
- identified with MIME type specification like
audio/mpeg
,audio/wav
, etc.
What is a high level object?
- Object with properties like
size
andtype
(MIME type).
blob
characteristics
Blob
s are immutable, you need to slice or create a new Blob
to change its content.
Blob
s are treated like a file.
- you can create a
URL
for it and pass it around.
Because Blob
is an encapsulated object, you can't directly access the bytes.
- you can request for it using a method.
myAudioBlob.arrayBuffer().then(arrayBuffer => { // 'arrayBuffer' holds the raw buffered bytes of the audio data. // You can create a TypedArray to work with the buffered bytes. const uint8Array = new Uint8Array(arrayBuffer); });