UNPKG

taglib-wasm

Version:

TagLib-Wasm is the universal tagging library for TypeScript/JavaScript platforms: Browsers, Node.js, Deno, Bun, Cloudflare Workers, and Electron apps

47 lines 2.38 kB
import type { FileHandle, TagLibModule } from "../wasm.js"; import type { AudioProperties, FileType, OpenOptions, PropertyMap } from "../types.js"; import type { MutableTag } from "./mutable-tag.js"; import type { TypedAudioFile } from "./audio-file-interface.js"; /** * Base implementation with core read/property operations. * Extended by AudioFileImpl to add save/picture/rating/extended methods. * * @internal Not exported from the public API. */ export declare abstract class BaseAudioFileImpl { protected readonly module: TagLibModule; protected fileHandle: FileHandle | null; protected cachedAudioProperties: AudioProperties | null; protected readonly sourcePath?: string; protected originalSource?: string | Uint8Array | ArrayBuffer | File; protected isPartiallyLoaded: boolean; protected readonly partialLoadOptions?: OpenOptions; /** Text-property wire keys in the partial header at load; undefined if full. */ protected readonly partialKeysAtLoad?: ReadonlySet<string>; constructor(module: TagLibModule, fileHandle: FileHandle, sourcePath?: string, originalSource?: string | Uint8Array | ArrayBuffer | File, isPartiallyLoaded?: boolean, partialLoadOptions?: OpenOptions); /** * Wire-key text properties present in the partial header at load but now * absent — the user deleted them. The partial-load reconstruct subtracts these * from its preserve-the-original merge so a deletion persists without wiping * frames beyond the loaded header (taglib-d14). Lyrics are excluded (they ride * their own reconstruct path); empty for a full load. */ protected partialDeletedPropertyKeys(): ReadonlySet<string>; protected get handle(): FileHandle; getFormat(): FileType; isFormat<F extends FileType>(format: F): this is TypedAudioFile<F>; tag(): MutableTag; audioProperties(): AudioProperties | undefined; properties(): PropertyMap; setProperties(properties: PropertyMap): void; getProperty(key: string): string | undefined; setProperty(key: string, value: string): void; isMP4(): boolean; getMP4Item(key: string): string | undefined; setMP4Item(key: string, value: string): void; removeMP4Item(key: string): void; isValid(): boolean; dispose(): void; [Symbol.dispose](): void; } //# sourceMappingURL=audio-file-base.d.ts.map