Last post Jul 04, 2011 07:33 AM by Lazz. _
Jul 04, 2011 03:52 AM|Nicoolai|LINK
I need some help, streaming an mp3 file to the browser.
I was kind of hoping, i could just make a generic handler, and feed the outputstream with the byte from the mp3 file, but I can't seem to make it work.
I was expecting to get a .mp3 file, just like I get an image, when I spit it's byte to the outputstream, but instead, I get the byte data in text.
Any clues on how I can solve this?
Jul 04, 2011 04:14 AM|Lazz. _|LINK
Jul 04, 2011 04:20 AM|Nicoolai|LINK
I'll take a look at that.
So I guess I can't just get Media Player to take over?
Jul 04, 2011 04:27 AM|Lazz. _|LINK
You can embed a media player as well, but you'll probably get a better compability and looks using a flash player. Embedding a media player is simpler thought, take a look at this link:
Jul 04, 2011 07:25 AM|Nicoolai|LINK
jPlayer looks very interesting, but I am having some problems with it, and I haven't been able to find much info online.
Say I want to feed it with a mp3 from a webservice/webhandler/whatever that reads the file from my database, instead of having an actual file lying on my server.
How on earth would I do that?
If I SetMedia to my Stream.ashx?id=1, it wont play.
Jul 04, 2011 07:33 AM|Lazz. _|LINK
I've actually only used jPlayer with mp3 files, never with a service.
But have you got it to work with a regular mp3? Otherwise it might be an issue with cross domain if you're using flash to play the file.