import EbmlElement from "../ebml/ebmlElement"; import { ByteVector } from "../byteVector"; import { ILazy } from "../interfaces"; import { IPicture, PictureType } from "../picture"; /** * Class that represents an attachment for a Matroska file */ export default class MatroskaAttachment implements IPicture, ILazy { private _data; private _description; private _filename; private _loader; private _mimeType; private _type; private _uid; private constructor(); /** * Constructs and initializes a new instance using an EBML parser. * @param element EBML element that represents the attachment */ static fromAttachmentElement(element: EbmlElement): MatroskaAttachment; /** * Constructs and initializes a new instance using an existing picture object. * @param picture Picture to use to initialize the new instance */ static fromPicture(picture: IPicture): MatroskaAttachment; /** @inheritDoc */ get data(): ByteVector; /** @inheritDoc */ set data(value: ByteVector); /** @inheritDoc */ get description(): string; /** @inheritDoc */ set description(value: string); /** @inheritDoc */ get filename(): string; /** * @inheritDoc * @remarks * Although this value can be set to anything, it is recommended if creating an * attachment from a {@link IPicture} to not change this value. Matroska does not have a * concept of attachment "type", so node-taglib-sharp embeds the type in the filename * field. */ set filename(value: string); /** @inheritDoc */ get isLoaded(): boolean; /** @inheritDoc */ get mimeType(): string; /** @inheritDoc */ set mimeType(value: string); /** @inheritDoc */ get type(): PictureType; /** * @inheritDoc * @remarks * Since Matroska attachments do not have a concept of "type", in order for this * value to be preserved, the string representation of the type will be embedded in the * {@link filename}. */ set type(value: PictureType); /** * Unique ID representing the file. */ get uid(): bigint; /** @inheritDoc */ load(): void; }