Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
pear-radio-backend
Advanced tools
Backend connectivity for Pear Radio.
User communication interface.
const user = new User(syncResponseCallback, opts)
await user.ready()
Gets user/streamer information by key.
const info = await user.getUserInfo(key)
User information is an object:
{
publicKey: buffer,
name: string,
description: string,
tags: c.string
}
Gets user/streamer information about the track that is streaming at the moment.
const info = await user.syncRequest(key)
{
block: uint,
artist: string,
name: string
}
Receives stream from remote user/streamer.
const listener = new Listener(userPublicKey, swarm, store)
await listener.ready()
Returns the stream of the remote user core, starting from block fromBlock
. Each block corresponds to ~1 second of audio.
Streams audio data and metadata.
const streamer = new Streamer(keyPair, swarm, store, opts)
await streamer.ready()
Streams single track.
Collection of static methods to read mp3 files and ID3 tags.
Returns { localStream, remoteStream }
. localStream
is a fs.createReadStream
of a given file. remoteStream
streams chunks of the file of ~1 second of audio.
Return metadata and duration information of an mp3 file.
{
file: string // filename
name: string, // track title
artist: string, // track artist
duration: uint, // duration in seconds
path: string // absolute path of the file
}
Http server that stream mp3 files for local consumption.
const httpStreamer = new HttpAudioStreamer()
const port = await httpStreamer.ready()
const { localStream } = Mp3ReadStream.stream(absPath)
httpStreamer.stream(localStream) // stream mp3 file in localhost:$port
Hyperbee that stores pear radio user information.
const configuration = new PearRadioConfiguration()
await configuration.ready()
Returns value of the given key.
Sets value for the given key, with format compact-encoding.any
.
Hyperswarm based tags search for users connectivity.
const tagManager = new TagManager(user)
await tagManager.ready()
The tagManager will announce itself in the #all
topic, and store all connections in the tagManager.tags
.
Announces tag manager in the given tag topic.
await tagManager.searchByTag(tag)
tagManager.on('stream-found', (userInfo) => {
console.log(userInfo)
})
FAQs
Pear radio backend
The npm package pear-radio-backend receives a total of 1 weekly downloads. As such, pear-radio-backend popularity was classified as not popular.
We found that pear-radio-backend demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.