import { ByteVector } from "../../byteVector"; import { Frame, FrameClassType } from "./frame"; import { Id3v2FrameHeader } from "./frameHeader"; import { EventType, TimestampFormat } from "../utilTypes"; /** * Class that represents an event for usage in a {@link EventTimeCodeFrame}. */ export declare class EventTimeCode { private _time; private _eventType; /** * Constructs and initializes a new instance. * @param eventType Type of event the instance represents * @param time Timestamp when the event occurs */ constructor(eventType: EventType, time: number); /** * Constructs and initializes a blank new instance of type {@link EventType.Padding} at time 0. */ static fromEmpty(): EventTimeCode; /** * Gets the timestamp when the event occurs. The format of the value is determined by the * frame that contains the timecode event. */ get time(): number; /** * Sets the timestamp when the event occurs. The format of the value is determined by the * frame that contains the timecode event. * @param value Timestamp when the event occurs. */ set time(value: number); /** * Gets the type of the event the current instance represents. */ get eventType(): EventType; /** * Sets the type of the event the current instance represents. * @param value Type of the event */ set eventType(value: EventType); /** * Creates a copy of this instance */ clone(): EventTimeCode; /** * Generates the byte representation of the event time code. */ render(): ByteVector; } /** * Represents an ID3v2 event time code frame, which is used to store a timestamps for events within * a track. */ export declare class EventTimeCodeFrame extends Frame { private _events; private _timestampFormat; private constructor(); /** * Constructs and initializes a new instance without contents */ static fromEmpty(): EventTimeCodeFrame; /** * Constructs and initializes a timestamp format set * @param timestampFormat Timestamp format for the event codes stored in this frame */ static fromTimestampFormat(timestampFormat: TimestampFormat): EventTimeCodeFrame; /** * Constructs and initializes a new instance by reading its raw data in a specified ID3v2 * version. This method allows for offset reading from the data byte vector. * @param data Raw representation of the new frame * @param offset What offset in `data` the frame actually begins. Must be positive, * safe integer * @param header Header of the frame found at `data` in the data * @param version ID3v2 version the frame was originally encoded with */ static fromOffsetRawData(data: ByteVector, offset: number, header: Id3v2FrameHeader, version: number): EventTimeCodeFrame; /** * Constructs and initializes a new instance by reading its raw data in a specified * ID3v2 version. * @param data Raw representation of the new frame * @param version ID3v2 version the raw frame is encoded with, must be a positive 8-bit integer */ static fromRawData(data: ByteVector, version: number): EventTimeCodeFrame; /** @inheritDoc */ get frameClassType(): FrameClassType; /** * Gets the event this frame contains. Each {@link EventTimeCode} represents a single event at a * certain point in time. */ get events(): EventTimeCode[]; /** * Sets the event this frame contains */ set events(value: EventTimeCode[]); /** * Gets the format of timestamps in this frame instance */ get timestampFormat(): TimestampFormat; /** * Sets the format of timestamps in this frame instance */ set timestampFormat(value: TimestampFormat); /** @inheritDoc */ clone(): Frame; /** @inheritDoc */ protected parseFields(data: ByteVector): void; /** @inheritDoc */ protected renderFields(): ByteVector; }