Open gbxl opened 8 years ago
Will add a list to check out if the coming stream is a acceptable mp3 stream, thank you
I'm actually having all kind of issues with the "audio/mp3" files like:
Note: Illegal Audio-MPEG-Header 0x41504554 at offset 11011098.
Note: Trying to resync...
Note: Hit end of (available) data during resync.
[../deps/mpg123/src/output/coreaudio.c:81] warning: Didn't have any audio data in callback (buffer underflow)
It seems to be related to lame
, but I'm not sure.
@gbxl 'audio/mpeg' is default mime type for mp3 files. Try to serve mp3 files with python -m SimpleHTTPServer
, they would have 'audio/mpeg' header and will be playing fine by player
My files are hosted on S3. But switching to 'audio/mp3' in player's code allows me to play the files. I just get errors. That seems crazy to me that those errors would be only due to http headers. I believe there is another issue.
@gbxl if server uses non-standard mime type, it can also somehow modify content. Also are you sure you have errors? Log from previous message contains only warnings.
Yeah, I usually get a [1] 42226 segmentation fault node test.js
after a couple of those warnings.
You say it plays mp3, but it seems like it is very limited, down to only 'audio/mpeg' (https://github.com/guo-yu/player/blob/master/dist/player.js#L341). I tried replacing it by "audio/mp3" and it seems to be working. You should have an array of available content types. I think 'audio/mpeg' only is too restrictive.