import IsoUserDataBox from "./boxes/isoUserDataBox"; import { AppleDataBoxFlagType } from "./boxes/appleDataBox"; import { ByteVector } from "../byteVector"; import { IPicture } from "../picture"; import { Tag, TagTypes } from "../tag"; export default class AppleTag extends Tag { /** * Contains the ISO meta box in which that tag will be stored. */ private readonly _metaBox; /** * Contains the ILST box which holds all the values. */ private readonly _ilstBox; /** * Constructs and initializes a new instance of {@link AppleTag} for a specified ISO user data box. * @param box A {@link IsoUserDataBox} from which the tag is to be read. */ constructor(box: IsoUserDataBox); /** @inheritDoc */ get tagTypes(): TagTypes; /** @inheritDoc */ get sizeOnDisk(): number; /** @inheritDoc */ get title(): string; /** @inheritDoc */ set title(v: string); /** @inheritDoc */ get subtitle(): string; /** @inheritDoc */ set subtitle(v: string); /** @inheritDoc */ get description(): string; /** @inheritDoc */ set description(v: string); /** @inheritDoc */ get performers(): string[]; /** @inheritDoc */ set performers(v: string[]); /** @inheritDoc */ get performersRole(): string[]; /** @inheritDoc */ set performersRole(v: string[]); /** @inheritDoc */ get albumArtists(): string[]; /** @inheritDoc */ set albumArtists(v: string[]); /** @inheritDoc */ get composers(): string[]; /** @inheritDoc */ set composers(v: string[]); /** @inheritDoc */ get album(): string; /** @inheritDoc */ set album(v: string); /** @inheritDoc */ get comment(): string; /** @inheritDoc */ set comment(v: string); /** @inheritDoc */ get genres(): string[]; /** @inheritDoc */ set genres(v: string[]); /** @inheritDoc */ get year(): number; /** @inheritDoc */ set year(v: number); /** @inheritDoc */ get track(): number; /** @inheritDoc */ set track(v: number); /** @inheritDoc */ get trackCount(): number; /** @inheritDoc */ set trackCount(v: number); /** @inheritDoc */ get disc(): number; /** @inheritDoc */ set disc(v: number); /** @inheritDoc */ get discCount(): number; /** @inheritDoc */ set discCount(v: number); /** @inheritDoc */ get lyrics(): string; /** @inheritDoc */ set lyrics(v: string); /** @inheritDoc */ get grouping(): string; /** @inheritDoc */ set grouping(v: string); /** @inheritDoc */ get beatsPerMinute(): number; /** @inheritDoc */ set beatsPerMinute(v: number); /** @inheritDoc */ get conductor(): string; /** @inheritDoc */ set conductor(v: string); /** @inheritDoc */ get copyright(): string; /** @inheritDoc */ set copyright(v: string); /** @inheritDoc */ get dateTagged(): Date | undefined; /** @inheritDoc */ set dateTagged(value: Date | undefined); /** @inheritDoc */ get albumArtistsSort(): string[]; /** @inheritDoc */ set albumArtistsSort(v: string[]); /** @inheritDoc */ get performersSort(): string[]; /** @inheritDoc */ set performersSort(v: string[]); /** @inheritDoc */ get composersSort(): string[]; /** @inheritDoc */ set composersSort(v: string[]); /** @inheritDoc */ get albumSort(): string; /** @inheritDoc */ set albumSort(v: string); /** @inheritDoc */ get titleSort(): string; /** @inheritDoc */ set titleSort(v: string); /** @inheritDoc */ get musicBrainzArtistId(): string; /** @inheritDoc */ set musicBrainzArtistId(v: string); /** @inheritDoc */ get musicBrainzReleaseGroupId(): string; /** @inheritDoc */ set musicBrainzReleaseGroupId(v: string); /** @inheritDoc */ get musicBrainzReleaseId(): string; /** @inheritDoc */ set musicBrainzReleaseId(v: string); /** @inheritDoc */ get musicBrainzReleaseArtistId(): string; /** @inheritDoc */ set musicBrainzReleaseArtistId(v: string); /** @inheritDoc */ get musicBrainzTrackId(): string; /** @inheritDoc */ set musicBrainzTrackId(v: string); /** @inheritDoc */ get musicBrainzDiscId(): string; /** @inheritDoc */ set musicBrainzDiscId(v: string); /** @inheritDoc */ get musicIpId(): string; /** @inheritDoc */ set musicIpId(v: string); /** @inheritDoc */ get amazonId(): string; /** @inheritDoc */ set amazonId(v: string); /** @inheritDoc */ get musicBrainzReleaseStatus(): string; /** @inheritDoc */ set musicBrainzReleaseStatus(v: string); /** @inheritDoc */ get musicBrainzReleaseType(): string; /** @inheritDoc */ set musicBrainzReleaseType(v: string); /** @inheritDoc */ get musicBrainzReleaseCountry(): string; /** @inheritDoc */ set musicBrainzReleaseCountry(v: string); /** @inheritDoc */ get replayGainTrackGain(): number; /** @inheritDoc */ set replayGainTrackGain(v: number); /** @inheritDoc */ get replayGainTrackPeak(): number; /** @inheritDoc */ set replayGainTrackPeak(v: number); /** @inheritDoc */ get replayGainAlbumGain(): number; set replayGainAlbumGain(v: number); /** @inheritDoc */ get replayGainAlbumPeak(): number; /** @inheritDoc */ set replayGainAlbumPeak(v: number); /** @inheritDoc */ get initialKey(): string; /** @inheritDoc */ set initialKey(v: string); /** @inheritDoc */ get isrc(): string; /** @inheritDoc */ set isrc(v: string); /** @inheritDoc */ get publisher(): string; /** @inheritDoc */ set publisher(v: string); /** @inheritDoc */ get remixedBy(): string; /** @inheritDoc */ set remixedBy(v: string); /** @inheritDoc */ get pictures(): IPicture[]; /** @inheritDoc */ set pictures(v: IPicture[]); /** @inheritDoc */ get isCompilation(): boolean; /** @inheritDoc */ set isCompilation(v: boolean); /** @inheritDoc */ get isEmpty(): boolean; /** @inheritDoc */ clear(): void; /** * Gets all strings from the iTunes boxes with the given MEAN/NAME combination. * @param meanString MEAN box contents to look for * @param nameString NAME box contents to look for * @returns string[] Text contents of the iTunes boxes with the given NAME/MEAN combination or * `[]` if there are no matches. */ getItunesStrings(meanString: string, nameString: string): string[]; /** * Gets the first string from the iTunes boxes with the given MEAN/NAME combination. * @param meanString MEAN box contents to search for * @param nameString NAME box contents to search for * @returns string Text contents of the first iTunes box found with the given MEAN/NAME * combination or `undefined` if no matches found. */ getFirstItunesString(meanString: string, nameString: string): string; /** * Gets the text contents of all boxes with the given `boxType` inside the tag's ILST box. * @param boxType Type of box to search for * @returns string[] Text contents of all boxes with the given `boxType` or `undefined` if no * matches were found. */ getQuickTimeStrings(boxType: ByteVector): string[]; /** * Gets the raw data of all boxes within this tag's ILST box of the given `boxType`, optionally * matching the provided `flags * @param boxType Type of box to search for * @param flags Optional, box flags to search for. Defaults to * {@link AppleDataBoxFlagType.ContainsData} * @returns ByteVector[] Raw contents of the matching boxes, `[]` if no matches are found. */ getQuickTimeData(boxType: ByteVector, flags?: AppleDataBoxFlagType): ByteVector[]; /** * Gets the text contents of the first box within this tag's ILST box that matches the provided * `boxType`. * @param boxType Type of the box to search for. * @returns string Text contents of the first matching box. `undefined` if no matches are found */ getFirstQuickTimeString(boxType: ByteVector): string; /** * Gets the raw data contents of the first box within this tag's ILST box that matches the * provided `boxType`, optionally matching `flags` and a predicate. * @param boxType Type of box to search for * @param flags Optional flags to match, defaults to {@link AppleDataBoxFlagType.ContainsData} * @param predicate Optional additional criteria the box must match * @returns ByteVector Raw data contents of the first matching box. `undefined` if no matches * are found */ getFirstQuickTimeData(boxType: ByteVector, flags?: AppleDataBoxFlagType, predicate?: (d: ByteVector) => boolean): ByteVector; /** * Stores the provided `dataStrings` in iTunes boxes with the provided MEAN and NAME strings. * This replaces any existing boxes. * @param meanString MEAN box contents to set * @param nameString NAME box contents to set * @param dataStrings Contents of the iTunes box to store. Use `[]` or `undefined` to clear * the existing contents and leave empty. */ setItunesStrings(meanString: string, nameString: string, ...dataStrings: string[]): void; /** * Stores the provided `data` in boxes with the provided box type. If `flags` are provided, the * DATA boxes created to store `data` will have the `flags` applied to them. This replaces all * existing boxes of the given type. * @param boxType Type of the box to set * @param data Data to store in the boxes * @param flags Optional, flags to set on the DATA boxes */ setQuickTimeData(boxType: ByteVector, data: ByteVector[], flags?: AppleDataBoxFlagType): void; /** * Stores the provided string in a box with the provided box type. This replaces all boxes of * the given type with a single box containing the provided data. * @param boxType Type of box to set * @param dataString Contents to store in the box */ setQuickTimeString(boxType: ByteVector, dataString: string): void; /** * Stores the provided strings in boxes with the provided box type. This replaces all boxes of * the given type with a single box of the given type containing a DATA box for each of the * provided `dataStrings`. * @param boxType Type of box to set * @param dataStrings Contents to store in the box */ setQuickTimeStrings(boxType: ByteVector, dataStrings: string[]): void; /** * Detaches the internal "ilst" box from its parent element. * @internal */ detachIlst(): void; private setFractionalNumber; }