guo-yu / player

a command line player, supports play mp3 both from uri and local stream.
261 stars 66 forks source link

Cannot play a stream #27

Closed rapsli closed 9 years ago

rapsli commented 9 years ago

Here is my sample code. Playing the demo.mp3 works fine, but what I'm trying to accomplish is playing a music stream, which unfortunately it fails to do. Any hints?

var Player = require('player');

var player = new Player('http://stream.srg-ssr.ch/m/rsp/mp3_128');
//var player = new Player('http://node-player.qiniudn.com/demo.mp3');

player.play(function(err, player){
        console.log("playend");
});
guo-yu commented 9 years ago

@rapsli Actually it's a bug. I will fix this in next version v0.3.0

guo-yu commented 9 years ago

@rapsli player module now support playing music stream, please check out examples/stream.js, this feature provided in version v0.3.0 which has been shipped.