dcent-beats
v2.0.0
Published
Decentralised music based on Hypercore
Downloads
193
Maintainers
Readme
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).