guo-yu / player

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

protocol http not supported #25

Closed sgardn closed 9 years ago

sgardn commented 9 years ago

I get the following error when trying to run the online example from a cloned repo (with command node examples/online.js ):

https.js:101 throw new Error('Protocol:' + options.protocol + ' not supported.'); ^ Error: Protocol:http: not supported. at Object.exports.request (https.js:101:11) at Object.exports.get (https.js:127:21) at Player.download (/Users/Scott/Code/player/libs/player.js:118:43) at Player.read (/Users/Scott/Code/player/libs/player.js:167:8) at play (/Users/Scott/Code/player/libs/player.js:66:10) at iterate (/Users/Scott/Code/player/node_modules/async/lib/async.js:142:13) at Object.async.eachSeries (/Users/Scott/Code/player/node_modules/async/lib/async.js:158:9) at Player.play (/Users/Scott/Code/player/libs/player.js:60:9) at Object. (/Users/Scott/Code/player/examples/online.js:8:8) at Module._compile (module.js:456:26)

Any idea why?

guo-yu commented 9 years ago

Err.. I have no idea why this error happened...

guo-yu commented 9 years ago

Well, It's a bug and have been fixed. It's caused by last merge, a typo indexOf in libs/player.js function download()