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 = new Image();
img.onload = () => {
ctx.drawImage(img, 0, 0);
};
img.src = URL.createObjectURL(new Blob([buf]));
Generated using TypeDoc
Represents a file within a
Switch.Album
content 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
,lastModified
andarrayBuffer()
. It also has additional metadata likeapplicationId
to determine which application generated the contents.Example