import CombinedTag from "../combinedTag"; import XiphComment from "../xiph/xiphComment"; import { Tag } from "../tag"; /** * This class combines a collection of {@link XiphComment} objects so that tagging properties can * be read from each but are only set to the first comment of the file. */ export default class OggTag extends CombinedTag { private _comments; /** * Constructs and initializes a new instance with no contents. */ constructor(comments: Map); /** * Gets the list of comments in the current instance, in the order they were added. * @remarks Modifying this array makes no changes to the file. Use {@link setComment}. */ get comments(): XiphComment[]; /** * Gets the list of stream serial numbers that have comments associated with them. * @remarks Modifying this array makes no changes to the file. Use {@link setComment}. */ get serialNumbers(): number[]; /** * Retrieves a Xiph comment for a given stream. * @param streamSerialNumber Serial number of the stream that contains the desired comment. * Must be a positive 32-bit integer. * @returns * Xiph comment of the provided stream is returned if it exists, otherwise * `undefined` is returned. */ getComment(streamSerialNumber: number): XiphComment; /** * Stores or removes a Xiph comment in a given stream. * @remarks * As per Ogg spec, each stream must have a Xiph comment header. Therefore, comments * cannot be set to a falsy value. * @param streamSerialNumber Serial number of the stream in which to store the comment. Must be * a positive 32-bit integer * @param comment Xiph comment to store in the stream. Use `undefined` to clear the comment * from the stream */ setComment(streamSerialNumber: number, comment: XiphComment): void; /** @inheritDoc */ get sizeOnDisk(): number; /** * @inheritDoc * @remarks Tags cannot be added or removed from Ogg files. This will always throw. */ createTag(): Tag; /** * @inheritDoc * @remarks Tags cannot be added or removed from Ogg files. This will do nothing. */ removeTags(): void; }