guo-yu / player

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

Playing stream without extension #54

Open sebastiaanluca opened 8 years ago

sebastiaanluca commented 8 years ago

Playing streams ending in .mp3 seems to be no problem, but is there any chance it can play streams like http://live.nsbradio.co.uk:8904/ too? As far as I can figure out that's the correct stream (even though it shows a page when browsing to it). The content type is audio/mpeg, but without the extension I get an error like

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: EISDIR: illegal operation on a directory, read
    at Error (native)

Cutting off the ending slash (/) produces

{ [Error: Parse Error] bytesParsed: 0, code: 'HPE_INVALID_CONSTANT' }