taglib-wasm
Version:
TagLib-Wasm is the universal tagging library for TypeScript/JavaScript platforms: Browsers, Node.js, Deno, Bun, Cloudflare Workers, and Electron apps
53 lines • 2.38 kB
TypeScript
import type { FileHandle, TagLibModule } from "../wasm.js";
import type { OpenOptions, Picture } from "../types.js";
import type { Chapter, SetChaptersOptions } from "../types/chapters.js";
import type { BroadcastAudioExtension } from "../types/bwf.js";
import type { Id3v2Frame, Rating, UnsyncedLyrics } from "../constants/complex-properties.js";
import { type NormalizedRating } from "../utils/rating.js";
import type { AudioFile } from "./audio-file-interface.js";
import { BaseAudioFileImpl } from "./audio-file-base.js";
/** @internal Exported for unit tests (tests/node-fs-acquisition.test.ts). */
export declare function readFileSync(path: string): Uint8Array;
/**
* Implementation of AudioFile interface using Embind API.
*
* @internal This class is not meant to be instantiated directly.
* Use TagLib.open() to create instances.
*/
export declare class AudioFileImpl extends BaseAudioFileImpl implements AudioFile {
private pathModeBuffer;
constructor(module: TagLibModule, fileHandle: FileHandle, sourcePath?: string, originalSource?: string | Uint8Array | ArrayBuffer | File, isPartiallyLoaded?: boolean, partialLoadOptions?: OpenOptions);
save(): boolean;
getFileBuffer(): Uint8Array;
saveToFile(path?: string): Promise<void>;
getPictures(): Picture[];
setPictures(pictures: Picture[]): void;
addPicture(picture: Picture): void;
removePictures(): void;
getChapters(): Chapter[];
setChapters(chapters: Chapter[], options?: SetChaptersOptions): void;
getBext(): BroadcastAudioExtension | undefined;
setBext(bext: BroadcastAudioExtension): void;
getBextData(): Uint8Array | undefined;
setBextData(data: Uint8Array | null): void;
getIxml(): string | undefined;
setIxml(data: string | null): void;
getRatings(): Rating[];
setRatings(ratings: Rating[]): void;
getLyrics(): UnsyncedLyrics[];
setLyrics(lyrics: UnsyncedLyrics[]): void;
getRating(): NormalizedRating | undefined;
setRating(rating: number, email?: string): void;
getId3v2Frames(id?: string): Id3v2Frame[];
setId3v2Frames(id: string, data: Uint8Array[]): void;
removeId3v2Frames(id: string): void;
hasId3Tags(): {
v1: boolean;
v2: boolean;
};
stripId3Tags(opts?: {
v1?: boolean;
v2?: boolean;
}): void;
}
//# sourceMappingURL=audio-file-impl.d.ts.map