Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
icecast-stack
Advanced tools
A `StreamStack` implementation for parsing and/or injecting metadata with SHOUTcast/Icecast radio streams.
This module offers an interface for retrieving the raw audio data and
parsing the metadata from a SHOUTcast or Icecast broadcast. Two API's
are offered: a low-level StreamStack read and write interface (which
requires you to establish the connection to the net.Stream
yourself), and a
more convenient high-level
ReadStream interface (which
creates a net.Stream
connection, and uses the StreamStack
interfaces
transparently).
Here's a basic example of just piping the clean audio data to stdout, while printing the HTTP response headers and metadata events to stderr:
var icecast = require('icecast-stack');
var url = 'http://67.205.85.183:5500'; // URL to a known Icecast stream
var stream = icecast.createReadStream(url);
// Fired when the `net.Stream` has it's 'connect' event.
stream.on('connect', function() {
console.error("Radio Stream connected!");
});
// Fired after the HTTP response headers have been received.
stream.on('response', function(res) {
console.error("Radio Stream response!");
console.error(res.headers);
});
// When a 'metadata' event happens, usually a new song is starting.
stream.on('metadata', function(metadata) {
var title = icecast.parseMetadata(metadata).StreamTitle;
console.error(title);
});
// Proxy the raw audio stream to 'stdout', redirect to a file!
stream.pipe(process.stdout);
Look in the examples
directory for code of some more complex use-cases.
The most important use case of this is for HTML5 web apps that listen to
radio streams; the <audio>
tag doesn't know how to deal with the extra
metadata and it is impossible to extract (on the client-side). But a
WebSocket connection could be used in conjunction with this module to provide
those metadata
events to a web browser, for instance.
Installation through npm is the most
straight-forward way to install the node-icecast-stack
module:
$ npm install icecast-stack
Or just checking out this git repo works as well:
$ git clone git://github.com/TooTallNate/node-icecast-stack.git
FAQs
A `StreamStack` implementation for parsing and/or injecting metadata with SHOUTcast/Icecast radio streams.
The npm package icecast-stack receives a total of 12 weekly downloads. As such, icecast-stack popularity was classified as not popular.
We found that icecast-stack demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.