- Add publish workflow
- Add
TSSEframe support
- Add
TCMPframe support
- Add TypeScript declaration file
- Breaking: Now this library exports only as JS native module (not UMD) and use named export (not default export)
Migration on Nodejs:
// v5 common js
const ID3Writer = require('browser-id3-writer');
// v5 esm interop
import ID3Writer from 'browser-id3-writer';
// v6
import { ID3Writer } from 'browser-id3-writer';Migration on browsers:
<!-- v5 -->
<script src="browser-id3-writer.js"></script>
<script>
// your code using ID3Writer
</script>
<!-- v6 -->
<script type="module">
import { ID3Writer } from 'browser-id3-writer.mjs';
// your code
</script>- Breaking: Change
TDATframe type from number to string as some values is not possible to represent as number in JS (like 0212), so this change fixes ability to properly encode this frame in some situations:
// v4
writer.setFrame('TDAT', 1234);
// v5
writer.setFrame('TDAT', '1234');- Breaking: Drop Babel, so now this library requires ES6 native support (IE isn't supported anymore)
- Add
IPLSandSYLTframes support
- Add language support for
COMMandUSLTframes:
writer.setFrame('USLT', {
language: 'jpn',
description: '例えば',
lyrics: 'サマータイム',
});- Add
TLAN,TIT1,TIT3frames
- Remove
TKEYframe validation - Support
TEXTandPRIVframes
- Add support for
TCOP,TSRCandTDATframes
- Breaking: Now description of
APICframe is encoded in Western encoding by-default. That's because of a problem with iTunes and Finder on macOS. You can still encode it in Unicode encoding by specifying it:
// v3
writer.setFrame('APIC', {
type: 3,
data: coverArrayBuffer,
description: 'Продам гараж',
});
// v4
writer.setFrame('APIC', {
type: 3,
data: coverArrayBuffer,
description: 'Продам гараж',
useUnicodeEncoding: true, // that's dangerous
});- Decrease library size from
8.68 kBto7.3 kBin result of using rollup instead of webpack
- Now this library works in
IE10. Just replacedArrayBuffer.prototype.slicetoTypedArray.prototype.subarray.
- No new features / bug fixes, but now readme in both Github and npm will contain exact library version and integrity to include it from CDN.
- Breaking: now only minified version of the lib is distributed and without maps. If you are using v2 browser-id3-writer.js from CDN update the link:
<!-- v2 -->
<script src="//unpkg.com/browser-id3-writer@^2.0.0/dist/browser-id3-writer.js"></script>
<script src="//unpkg.com/browser-id3-writer@^2.0.0/dist/browser-id3-writer.min.js"></script>
<!-- v3 -->
<script src="https://unpkg.com/browser-id3-writer@3.0.0"></script>- Breaking: no more "Unknown Artist" is added when you set
TPE1orTCOMframes with empty array - Breaking:
USLTframe now accepts an object with keys description and lyrics:
// v2
writer.setFrame('USLT', 'This is unsychronised lyrics');
// v3
writer.setFrame('USLT', {
description: '',
lyrics: 'This is unsychronised lyrics',
});- Breaking:
APICframe now accepts an object with keys type (seeAPICpicture types), data and description:
// v2
writer.setFrame('APIC', coverArrayBuffer);
// v3
writer.setFrame('APIC', {
type: 3,
data: coverArrayBuffer,
description: '',
});- Add support for next frames:
COMM,TXXX,WCOM,WCOP,WOAF,WOAR,WOAS,WORS,WPAY,WPUB,TKEY,TMED,TPE4,TPE3andTBPM. See readme for usage info.