import CombinedTag from "../combinedTag"; import EndTag from "../sandwich/endTag"; import StartTag from "../sandwich/startTag"; import XiphComment from "../xiph/xiphComment"; import XiphPicture from "../xiph/xiphPicture"; import { IPicture } from "../picture"; import { Tag, TagTypes } from "../tag"; /** * Collection of tags that can be stored in a FLAC file. * @remarks * The FLAC file specification states that tagging should be done via a XIPH comment block * and any pictures should be stored in a FLAC picture block. However, tagging can be done via * ID3 and APE tags at the beginning or end of the file, same as MP3 and other files. This * class provides a unified interface into all the tags a FLAC file may contain. */ export default class FlacTag extends CombinedTag { private static readonly DEFAULT_TAG_LOCATION_MAPPING; private readonly _endTag; private readonly _pictures; private readonly _startTag; private _xiphComment; /** * Constructs and initializes a new FLAC tag using the component tags provided. * @param startTag Required, collection of tags at the start of the file * @param endTag Required, collection of tags at the end of the file * @param xiphTag Optional, Xiph comment tag from the FLAC file * @param flacPictures Optional, array of pictures found in the file */ constructor(startTag: StartTag, endTag: EndTag, xiphTag: XiphComment, flacPictures: XiphPicture[]); /** * Gets the collection of tags appearing at the end of the file. */ get endTag(): EndTag; /** * Gets the collection of tags appearing at the start of the file. */ get startTag(): StartTag; /** Gets the Xiph comment that is stored in the current instance. */ get xiphComment(): XiphComment; /** * @inheritDoc * @remarks * For FLAC files, FLAC-style pictures are preferentially returned. If those don't exist the * pictures that are stored in the combined tag. */ get pictures(): IPicture[]; /** * @inheritDoc * @remarks For FLAC files, pictures are preferentially stored in FLAC-style picture blocks. */ set pictures(value: IPicture[]); /** @inheritDoc */ get tagTypes(): TagTypes; /** @inheritDoc */ clear(): void; /** @inheritDoc */ createTag(tagType: TagTypes, copy: boolean): Tag; /** @inheritDoc */ removeTags(tagTypes: TagTypes): void; }