taglib-wasm 0.3.13 → 0.3.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -35
- package/dist/index.d.ts +10 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +117 -134
- package/dist/index.js.map +1 -0
- package/dist/src/constants.js +211 -0
- package/dist/src/constants.js.map +1 -0
- package/dist/src/errors.js +180 -0
- package/dist/src/errors.js.map +1 -0
- package/dist/src/file-utils.d.ts +2 -2
- package/dist/src/file-utils.d.ts.map +1 -1
- package/dist/src/file-utils.js +394 -0
- package/dist/src/file-utils.js.map +1 -0
- package/dist/src/mod.d.ts +4 -4
- package/dist/src/mod.d.ts.map +1 -1
- package/dist/src/mod.js +7 -0
- package/dist/src/mod.js.map +1 -0
- package/dist/src/simple.d.ts +4 -4
- package/dist/src/simple.d.ts.map +1 -1
- package/dist/src/{simple.ts → simple.js} +193 -311
- package/dist/src/simple.js.map +1 -0
- package/dist/src/taglib.d.ts +3 -3
- package/dist/src/taglib.d.ts.map +1 -1
- package/dist/src/taglib.js +516 -0
- package/dist/src/taglib.js.map +1 -0
- package/dist/src/types.d.ts +2 -2
- package/dist/src/types.d.ts.map +1 -1
- package/dist/src/types.js +239 -0
- package/dist/src/types.js.map +1 -0
- package/dist/src/utils/file.js +65 -0
- package/dist/src/utils/file.js.map +1 -0
- package/dist/src/utils/write.js +49 -0
- package/dist/src/utils/write.js.map +1 -0
- package/dist/src/wasm-workers.d.ts +1 -1
- package/dist/src/wasm-workers.d.ts.map +1 -1
- package/dist/src/wasm-workers.js +148 -0
- package/dist/src/wasm-workers.js.map +1 -0
- package/dist/src/wasm.js +6 -0
- package/dist/src/wasm.js.map +1 -0
- package/dist/src/web-utils.d.ts +2 -2
- package/dist/src/web-utils.d.ts.map +1 -1
- package/{src/web-utils.ts → dist/src/web-utils.js} +102 -184
- package/dist/src/web-utils.js.map +1 -0
- package/dist/src/workers.d.ts +2 -2
- package/dist/src/workers.d.ts.map +1 -1
- package/dist/src/workers.js +389 -0
- package/dist/src/workers.js.map +1 -0
- package/dist/taglib-wrapper.js +8 -2528
- package/package.json +7 -10
- package/dist/index.ts +0 -221
- package/dist/src/constants.ts +0 -227
- package/dist/src/errors.ts +0 -254
- package/dist/src/file-utils.ts +0 -483
- package/dist/src/file.js +0 -52
- package/dist/src/global.d.ts +0 -12
- package/dist/src/mod.ts +0 -19
- package/dist/src/taglib.ts +0 -961
- package/dist/src/types.ts +0 -538
- package/dist/src/utils/file.ts +0 -86
- package/dist/src/utils/write.ts +0 -66
- package/dist/src/wasm-workers.ts +0 -176
- package/dist/src/wasm.ts +0 -133
- package/dist/src/web-utils.ts +0 -347
- package/dist/src/workers.ts +0 -461
- package/dist/src/write.js +0 -33
- package/index.ts +0 -221
- package/lib/taglib/COPYING.LGPL +0 -502
- package/lib/taglib/COPYING.MPL +0 -470
- package/lib/taglib/README.md +0 -24
- package/src/constants.ts +0 -227
- package/src/errors.ts +0 -254
- package/src/file-utils.ts +0 -483
- package/src/global.d.ts +0 -12
- package/src/mod.ts +0 -19
- package/src/simple.ts +0 -667
- package/src/taglib.ts +0 -961
- package/src/types.ts +0 -538
- package/src/utils/file.ts +0 -86
- package/src/utils/write.ts +0 -66
- package/src/wasm-workers.ts +0 -176
- package/src/wasm.ts +0 -133
- package/src/workers.ts +0 -461
|
@@ -20,11 +20,8 @@
|
|
|
20
20
|
* const modifiedBuffer = await setCoverArtFromCanvas("song.mp3", canvas);
|
|
21
21
|
* ```
|
|
22
22
|
*/
|
|
23
|
-
|
|
24
|
-
import
|
|
25
|
-
import { PictureType } from "./types.ts";
|
|
26
|
-
import { applyPictures, readPictures } from "./simple.ts";
|
|
27
|
-
|
|
23
|
+
import { PictureType } from "./types.js";
|
|
24
|
+
import { applyPictures, readPictures } from "./simple.js";
|
|
28
25
|
/**
|
|
29
26
|
* Convert a Picture object to a data URL for display in web browsers
|
|
30
27
|
*
|
|
@@ -38,12 +35,11 @@ import { applyPictures, readPictures } from "./simple.ts";
|
|
|
38
35
|
* imgElement.src = pictureToDataURL(pictures[0]);
|
|
39
36
|
* ```
|
|
40
37
|
*/
|
|
41
|
-
export function pictureToDataURL(picture
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
export function pictureToDataURL(picture) {
|
|
39
|
+
// Convert Uint8Array to base64
|
|
40
|
+
const base64 = btoa(String.fromCharCode(...picture.data));
|
|
41
|
+
return `data:${picture.mimeType};base64,${base64}`;
|
|
45
42
|
}
|
|
46
|
-
|
|
47
43
|
/**
|
|
48
44
|
* Convert a data URL to a Picture object
|
|
49
45
|
*
|
|
@@ -59,34 +55,26 @@ export function pictureToDataURL(picture: Picture): string {
|
|
|
59
55
|
* const modifiedBuffer = await applyPictures("song.mp3", [picture]);
|
|
60
56
|
* ```
|
|
61
57
|
*/
|
|
62
|
-
export function dataURLToPicture(
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return {
|
|
83
|
-
mimeType,
|
|
84
|
-
data,
|
|
85
|
-
type,
|
|
86
|
-
description,
|
|
87
|
-
};
|
|
58
|
+
export function dataURLToPicture(dataURL, type = PictureType.FrontCover, description) {
|
|
59
|
+
// Parse data URL
|
|
60
|
+
const matches = dataURL.match(/^data:([^;]+);base64,(.+)$/);
|
|
61
|
+
if (!matches) {
|
|
62
|
+
throw new Error("Invalid data URL format");
|
|
63
|
+
}
|
|
64
|
+
const [, mimeType, base64] = matches;
|
|
65
|
+
// Convert base64 to Uint8Array
|
|
66
|
+
const binaryString = atob(base64);
|
|
67
|
+
const data = new Uint8Array(binaryString.length);
|
|
68
|
+
for (let i = 0; i < binaryString.length; i++) {
|
|
69
|
+
data[i] = binaryString.charCodeAt(i);
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
mimeType,
|
|
73
|
+
data,
|
|
74
|
+
type,
|
|
75
|
+
description,
|
|
76
|
+
};
|
|
88
77
|
}
|
|
89
|
-
|
|
90
78
|
/**
|
|
91
79
|
* Set cover art from an HTML canvas element
|
|
92
80
|
*
|
|
@@ -104,33 +92,15 @@ export function dataURLToPicture(
|
|
|
104
92
|
* });
|
|
105
93
|
* ```
|
|
106
94
|
*/
|
|
107
|
-
export async function setCoverArtFromCanvas(
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
} = {},
|
|
116
|
-
): Promise<Uint8Array> {
|
|
117
|
-
const {
|
|
118
|
-
format = "image/jpeg",
|
|
119
|
-
quality = 0.92,
|
|
120
|
-
type = PictureType.FrontCover,
|
|
121
|
-
description = "Front Cover",
|
|
122
|
-
} = options;
|
|
123
|
-
|
|
124
|
-
// Convert canvas to data URL
|
|
125
|
-
const dataURL = canvas.toDataURL(format, quality);
|
|
126
|
-
|
|
127
|
-
// Convert to Picture object
|
|
128
|
-
const picture = dataURLToPicture(dataURL, type, description);
|
|
129
|
-
|
|
130
|
-
// Apply to file
|
|
131
|
-
return applyPictures(file, [picture]);
|
|
95
|
+
export async function setCoverArtFromCanvas(file, canvas, options = {}) {
|
|
96
|
+
const { format = "image/jpeg", quality = 0.92, type = PictureType.FrontCover, description = "Front Cover", } = options;
|
|
97
|
+
// Convert canvas to data URL
|
|
98
|
+
const dataURL = canvas.toDataURL(format, quality);
|
|
99
|
+
// Convert to Picture object
|
|
100
|
+
const picture = dataURLToPicture(dataURL, type, description);
|
|
101
|
+
// Apply to file
|
|
102
|
+
return applyPictures(file, [picture]);
|
|
132
103
|
}
|
|
133
|
-
|
|
134
104
|
/**
|
|
135
105
|
* Convert canvas to Picture object using blob for better performance
|
|
136
106
|
*
|
|
@@ -150,47 +120,26 @@ export async function setCoverArtFromCanvas(
|
|
|
150
120
|
* });
|
|
151
121
|
* ```
|
|
152
122
|
*/
|
|
153
|
-
export async function canvasToPicture(
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
if (!blob) {
|
|
173
|
-
reject(new Error("Failed to convert canvas to blob"));
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
// Convert blob to Uint8Array
|
|
178
|
-
const arrayBuffer = await blob.arrayBuffer();
|
|
179
|
-
const data = new Uint8Array(arrayBuffer);
|
|
180
|
-
|
|
181
|
-
resolve({
|
|
182
|
-
mimeType: format,
|
|
183
|
-
data,
|
|
184
|
-
type,
|
|
185
|
-
description,
|
|
186
|
-
});
|
|
187
|
-
},
|
|
188
|
-
format,
|
|
189
|
-
quality,
|
|
190
|
-
);
|
|
191
|
-
});
|
|
123
|
+
export async function canvasToPicture(canvas, options = {}) {
|
|
124
|
+
const { format = "image/jpeg", quality = 0.92, type = PictureType.FrontCover, description, } = options;
|
|
125
|
+
return new Promise((resolve, reject) => {
|
|
126
|
+
canvas.toBlob(async (blob) => {
|
|
127
|
+
if (!blob) {
|
|
128
|
+
reject(new Error("Failed to convert canvas to blob"));
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
// Convert blob to Uint8Array
|
|
132
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
133
|
+
const data = new Uint8Array(arrayBuffer);
|
|
134
|
+
resolve({
|
|
135
|
+
mimeType: format,
|
|
136
|
+
data,
|
|
137
|
+
type,
|
|
138
|
+
description,
|
|
139
|
+
});
|
|
140
|
+
}, format, quality);
|
|
141
|
+
});
|
|
192
142
|
}
|
|
193
|
-
|
|
194
143
|
/**
|
|
195
144
|
* Load an image file into a Picture object
|
|
196
145
|
*
|
|
@@ -210,22 +159,16 @@ export async function canvasToPicture(
|
|
|
210
159
|
* });
|
|
211
160
|
* ```
|
|
212
161
|
*/
|
|
213
|
-
export async function imageFileToPicture(
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
mimeType: file.type,
|
|
223
|
-
data,
|
|
224
|
-
type,
|
|
225
|
-
description: description || file.name,
|
|
226
|
-
};
|
|
162
|
+
export async function imageFileToPicture(file, type = PictureType.FrontCover, description) {
|
|
163
|
+
const arrayBuffer = await file.arrayBuffer();
|
|
164
|
+
const data = new Uint8Array(arrayBuffer);
|
|
165
|
+
return {
|
|
166
|
+
mimeType: file.type,
|
|
167
|
+
data,
|
|
168
|
+
type,
|
|
169
|
+
description: description || file.name,
|
|
170
|
+
};
|
|
227
171
|
}
|
|
228
|
-
|
|
229
172
|
/**
|
|
230
173
|
* Display a Picture in an HTML img element
|
|
231
174
|
*
|
|
@@ -239,29 +182,22 @@ export async function imageFileToPicture(
|
|
|
239
182
|
* displayPicture(pictures[0], img);
|
|
240
183
|
* ```
|
|
241
184
|
*/
|
|
242
|
-
export function displayPicture(
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
)
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
// Clean up object URL when image is no longer needed
|
|
259
|
-
imgElement.addEventListener("load", () => {
|
|
260
|
-
// Keep the URL alive for a bit to ensure image is rendered
|
|
261
|
-
setTimeout(() => URL.revokeObjectURL(objectURL), 100);
|
|
262
|
-
}, { once: true });
|
|
185
|
+
export function displayPicture(picture, imgElement) {
|
|
186
|
+
// Clean up previous object URL if any
|
|
187
|
+
if (imgElement.src.startsWith("blob:")) {
|
|
188
|
+
URL.revokeObjectURL(imgElement.src);
|
|
189
|
+
}
|
|
190
|
+
// Create blob and object URL
|
|
191
|
+
const blob = new Blob([picture.data], { type: picture.mimeType });
|
|
192
|
+
const objectURL = URL.createObjectURL(blob);
|
|
193
|
+
// Set the src
|
|
194
|
+
imgElement.src = objectURL;
|
|
195
|
+
// Clean up object URL when image is no longer needed
|
|
196
|
+
imgElement.addEventListener("load", () => {
|
|
197
|
+
// Keep the URL alive for a bit to ensure image is rendered
|
|
198
|
+
setTimeout(() => URL.revokeObjectURL(objectURL), 100);
|
|
199
|
+
}, { once: true });
|
|
263
200
|
}
|
|
264
|
-
|
|
265
201
|
/**
|
|
266
202
|
* Create a download link for a Picture
|
|
267
203
|
*
|
|
@@ -283,14 +219,10 @@ export function displayPicture(
|
|
|
283
219
|
* URL.revokeObjectURL(downloadUrl);
|
|
284
220
|
* ```
|
|
285
221
|
*/
|
|
286
|
-
export function createPictureDownloadURL(
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
): string {
|
|
290
|
-
const blob = new Blob([picture.data], { type: picture.mimeType });
|
|
291
|
-
return URL.createObjectURL(blob);
|
|
222
|
+
export function createPictureDownloadURL(picture, filename = "cover") {
|
|
223
|
+
const blob = new Blob([picture.data], { type: picture.mimeType });
|
|
224
|
+
return URL.createObjectURL(blob);
|
|
292
225
|
}
|
|
293
|
-
|
|
294
226
|
/**
|
|
295
227
|
* Extract all pictures and create a gallery
|
|
296
228
|
*
|
|
@@ -307,41 +239,27 @@ export function createPictureDownloadURL(
|
|
|
307
239
|
* });
|
|
308
240
|
* ```
|
|
309
241
|
*/
|
|
310
|
-
export async function createPictureGallery(
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
)
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
if (options.onClick) {
|
|
333
|
-
img.style.cursor = "pointer";
|
|
334
|
-
img.addEventListener("click", () => options.onClick!(picture, index));
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
wrapper.appendChild(img);
|
|
338
|
-
|
|
339
|
-
if (options.includeDescription && picture.description) {
|
|
340
|
-
const caption = document.createElement("p");
|
|
341
|
-
caption.textContent = picture.description;
|
|
342
|
-
wrapper.appendChild(caption);
|
|
343
|
-
}
|
|
344
|
-
|
|
345
|
-
container.appendChild(wrapper);
|
|
346
|
-
});
|
|
242
|
+
export async function createPictureGallery(file, container, options = {}) {
|
|
243
|
+
const pictures = await readPictures(file);
|
|
244
|
+
// Clear container
|
|
245
|
+
container.innerHTML = "";
|
|
246
|
+
pictures.forEach((picture, index) => {
|
|
247
|
+
const wrapper = document.createElement("div");
|
|
248
|
+
wrapper.className = options.className || "picture-item";
|
|
249
|
+
const img = document.createElement("img");
|
|
250
|
+
displayPicture(picture, img);
|
|
251
|
+
img.alt = picture.description || `Picture ${index + 1}`;
|
|
252
|
+
if (options.onClick) {
|
|
253
|
+
img.style.cursor = "pointer";
|
|
254
|
+
img.addEventListener("click", () => options.onClick(picture, index));
|
|
255
|
+
}
|
|
256
|
+
wrapper.appendChild(img);
|
|
257
|
+
if (options.includeDescription && picture.description) {
|
|
258
|
+
const caption = document.createElement("p");
|
|
259
|
+
caption.textContent = picture.description;
|
|
260
|
+
wrapper.appendChild(caption);
|
|
261
|
+
}
|
|
262
|
+
container.appendChild(wrapper);
|
|
263
|
+
});
|
|
347
264
|
}
|
|
265
|
+
//# sourceMappingURL=web-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-utils.js","sourceRoot":"","sources":["../../src/web-utils.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;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AAC;YACtD,MAAM,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,GAAG,CAAC,CAAC;YAC5C,OAAO,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;YAC1C,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;QAC/B,CAAC;QAED,SAAS,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/src/workers.d.ts
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @module taglib-wasm/workers
|
|
9
9
|
*/
|
|
10
|
-
import type { AudioFormat, AudioProperties, ExtendedTag, Tag, TagLibConfig } from "./types
|
|
11
|
-
import { type TagLibModule } from "./wasm-workers
|
|
10
|
+
import type { AudioFormat, AudioProperties, ExtendedTag, Tag, TagLibConfig } from "./types";
|
|
11
|
+
import { type TagLibModule } from "./wasm-workers";
|
|
12
12
|
/**
|
|
13
13
|
* Represents an audio file with metadata and properties (Workers-compatible).
|
|
14
14
|
* This implementation uses C-style function calls for Cloudflare Workers compatibility.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workers.d.ts","sourceRoot":"","sources":["../../src/workers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,eAAe,EACf,WAAW,EACX,GAAG,EACH,YAAY,EACb,MAAM,
|
|
1
|
+
{"version":3,"file":"workers.d.ts","sourceRoot":"","sources":["../../src/workers.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,eAAe,EACf,WAAW,EACX,GAAG,EACH,YAAY,EACb,MAAM,SAAS,CAAC;AACjB,OAAO,EAIL,KAAK,YAAY,EAClB,MAAM,gBAAgB,CAAC;AAGxB;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,MAAM,CAAe;IAC7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