import CombinedTag from "../combinedTag"; import EndTag from "./endTag"; import StartTag from "./startTag"; import { File, ReadStyle } from "../file"; import { Tag, TagTypes } from "../tag"; /** * This class represents a file that can have tags at the beginning and/or end of the file. Some * file types are fine with tags sandwiching the media contents of the file, but not all file * support this. * @remarks * This was called `NonContainer` in the original .NET implementation, implying that files * utilizing this pattern could not be containers. This is not true - MPEG containers, for * example, use this pattern. Therefore, the name was changed to better represent the situation. */ export default class SandwichTag extends CombinedTag { /** * List of the tag types that are supported by a sandwich file tag. */ static readonly SUPPORTED_TAG_TYPES: number; private readonly _defaultTagMappingTable; private readonly _endTag; private readonly _startTag; /** * Constructs a new instance for a specified file. * @param file File to read tags from the beginning and end of * @param readStyle How in-depth to read the tags from the file * @param defaultTagMappingTable Mapping of tag type to boolean function, used to determine * whether a tag type goes into the end tag or start tag */ constructor(file: File, readStyle: ReadStyle, defaultTagMappingTable: Map boolean>); /** * 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; /** @inheritDoc */ createTag(tagType: TagTypes, copy: boolean): Tag; }