The ID of the application which generated the album file.
The type of content which the album file contains. The value
corresponds with the CapsAlbumFileContents enum from @nx.js/constants.
Unique ID for when there's multiple album files with the same timestamp.
The value is usually 0.
The storage device which contains the album file. The value
corresponds with the CapsAlbumStorage enum from @nx.js/constants.
Returns the size of the Blob object, in bytes.
Returns the MIME type of the Blob object.
Returns a promise that resolves with an ArrayBuffer representing the Blob's data.
Returns a stream that can be used to read the contents of the Blob.
Loads the thumbnail JPEG image for the album file.
const ctx = screen.getContext('2d');
const buf = await file.thumbnail();
const img = await createImageBitmap(new Blob([buf]));
ctx.drawImage(img, 0, 0);
Represents a file within a
Switch.Albumcontent store, which is either a screenshot (JPEG image) or a screen recording (MP4 movie).It is a subclass of
File, so you can use familiar features likename,lastModifiedandarrayBuffer(). It also has additional metadata likeapplicationIdto determine which application generated the contents.Example