import { ByteVector } from "../../byteVector"; import { Frame, FrameClassType } from "./frame"; import { Id3v2FrameHeader } from "./frameHeader"; /** * This class extends {@link Frame} implementing support for ID3v2 play count (PCNT) frames. */ export default class PlayCountFrame extends Frame { private _playCount; private constructor(); /** * Constructs and initializes a new instance with a count of zero */ static fromEmpty(): PlayCountFrame; /** * Constructs and initializes a new instance of frame by reading its raw data in a specified * ID3v2 version starting at a specified offset. * @param data Raw representation of the new frame. * @param offset Offset into `data` where the frame actually begins. Must be a * positive, safe integer * @param header Header of the frame found at `offset` in the data * @param version ID3v2 version the frame was originally encoded with */ static fromOffsetRawData(data: ByteVector, offset: number, header: Id3v2FrameHeader, version: number): PlayCountFrame; /** * Constructs and initializes a new instance by reading its raw data in a specified ID3v2 * version * @param data ByteVector starting with the raw representation of the new frame * @param version ID3v2 version the raw frame is encoded in, must be a positive 8-bit integer */ static fromRawData(data: ByteVector, version: number): PlayCountFrame; /** @inheritDoc */ get frameClassType(): FrameClassType; /** * Gets the play count of the current instance. */ get playCount(): bigint; /** * Sets the play count of the current instance. * @param value Number of times this track has been played */ set playCount(value: bigint); /** @inheritDoc */ clone(): Frame; /** @inheritDoc */ protected parseFields(data: ByteVector): void; /** @inheritDoc */ protected renderFields(): ByteVector; }