Code Monkey home page Code Monkey logo

node-shoutcast's Introduction

Shoutcast

Shoutcast is a popular streaming audio server protocol. NodeJS lends itself very nicely to doing this kind of thing so building an app around it makes sense.

Disclaimer

Whatever is worse than alpha, this is it. Don't use it yet unless you want to help dev it. :) In that case, use it and submit patches. Thanks.

Usage

From the CLI

node shoutcast.js [mp3 directory]

From Code

var cast = require('shoutcast');
var station = cast.Station(conf);

http.createServer(function (req, res) {
  first.connect(res, function() {
    console.log("Stream ended?");
  });
}).listen(7000);

station.start();

License

MIT

node-shoutcast's People

Contributors

ncb000gt avatar

Stargazers

- ̗̀YoYo ̖́- avatar Anakin Skywalker avatar  avatar Fredy Mendez avatar James Anthony Bruno avatar Matthew avatar Bret Comnes avatar Nick Beattie avatar Igor M. avatar Tobi Schweiger avatar Riley Scheid avatar Berk Batuhan ŞAKAR avatar  avatar roks0n avatar Anthony avatar Jan Kuča avatar Steve Barbera avatar lorezz avatar Owen Kellogg avatar Michael Forrest avatar Michael Anthony avatar Radu Toader avatar Joonas avatar Ilic Davor avatar Guillaume RENAUDIE avatar Oğuz Bilgener avatar Chris Hollinworth avatar Marwan Hilmi avatar Mark D'Arensbourg avatar  avatar Cédric Dugat avatar Eak Netpanya avatar Aummua avatar Mārtiņš avatar Kenan Bacak avatar Dinesh Kr. Choudhary avatar Dan MacTough avatar Jorge (Hezi) Cohen avatar Scott Elcomb avatar André Gil avatar  avatar Roger Jungemann avatar Daniel Bartlett avatar

Watchers

 avatar Manfred Touron avatar Victor Sklyar avatar James Cloos avatar Michael Anthony avatar  avatar  avatar

node-shoutcast's Issues

I can't get the example code to run

I do npm install shoutcast, then I create test.js with this content:

var cast = require('shoutcast');
var station = cast.Station(conf);

http.createServer(function (req, res) {
  station.connect(res, function() {
    console.log("Stream ended?");
  });
}).listen(7000);

station.start();

When I do node ./test.js I get

module.js:338
    throw err;
          ^
Error: Cannot find module 'shoutcast'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at Object.<anonymous> (/Users/mf/code/shoutcast/server.js:1:74)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)
    at Function.Module._load (module.js:310:12)
    at Function.Module.runMain (module.js:501:10)

I tried a different node module and that worked, so I don't think it's anything to do with my paths - could it be that shoutcast-node is using an old way of doing modules or something?

util.pump() is deprecated. Use readableStream.pipe() instead.

Thanks for library!

I just noticed warning
util.pump() is deprecated. Use readableStream.pipe() instead.

i changed these lines, and it works!

/util.pump(this.stream, res, function() {
console.log('Shhhart');
res.end();
});
/

this.stream.getCurrent().pipe(res, function() {
console.log('Shhhart');
res.end();
});
}

Connection closed, after one track in playlist played

Hello, thanks for this module.

I have one misunderstanding with that code, maybe you can help me.

If folder for playing contains two or more mp3 files,
stream play only first one, after that connection was close.
We can able to listen second 'mp3' file, if reconnect to server (or again press play in winamp).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.