0.1.1 • Published 4 years ago

id3-rs v0.1.1

Weekly downloads
3
License
-
Repository
-
Last release
4 years ago

id3-rs

Build Status NPM Version

Bindings for rust-id3.

Installation

See the Neon Bindings docs.

Usage

At the moment, the data structures are very low-level. Binary data is encoded in base64.

Reading tags

const id3 = require('id3-rs')
// sync
console.log(id3.readTagsSync('file.mp3'))
// async
id3.readTags('file.mp3', (error, data) => console.log(error, data))
[
  { "id": "TIT2", "text": "Hope" },
  { "id": "RVAD", "data": "ABAAAAAAAAAAAA==" }
]

Writing tags

The method replaceTagAtIndexSync can be used to replace a frame (index as per readTags). If the index is out of bounds, the frame is appended.

const id3 = require('id3-rs')
// sync
id3.replaceTagAtIndexSync('file.mp3', -1, 'TBPM', '83')
// async
id3.replaceTagAtIndex('file.mp3', -1, 'TBPM', '83', (error, data) => console.log(error, data))
0.1.1

4 years ago

0.1.0

4 years ago