dcent-beats

2.0.0 • Public • Published

Dcent Beats

Decentralised music using the Hypercore protocol.

Dcent Beats creates a database on top of hyperbeats.

Its main responsibilities are:

  • Link to the hyperbeats
  • Ensure all referenced hypercores are indexed to be rehosted
  • Manage an index of music metadata

Install

npm i dcent-beats

Usage

See example.js

API

const dBeats = new DcentBeats(bee)

Create a new Dcent Beats instance, based on the passed-in Hyperbee.

const metaddata = await dBeats.getMetadata()

Get the metadata corresponding to this Dcent Beats song.

The metadata is an object:

{
  year, // Year of publishing
  title, // Song title
  artist, // Song artist
  durationSec, // Song duration in seconds
  version // internal version info ({ major, minor })
}

const beatsKey = await getBeatsKey()

Get the Hyper Beats key of this song (as buffer).

Package Sidebar

Install

npm i dcent-beats

Weekly Downloads

57

Version

2.0.0

License

Apache-2.0

Unpacked Size

18 kB

Total Files

6

Last publish

Collaborators

  • hdegroote