Click here to Skip to main content
15,886,724 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a simple c# application that record & stream audio with naudio & lame. I use System.Net.Socket for the streaming, just wait for connection, read the header and then pass the socket to lame encoder that will send chunks of mp3.

Problem is, FF's audio tag cannot play the thing, it just returns
All candidate resources failed to load. Media load paused.
. And I specifically mention FF's audio tag because I can play it directly if I put the link in url tab. searching, I found this link[^] that explain why firefox does all sort of random requests to determine file length and such. But I don't want that, is there anyway of making FF leaves my audio alone? (ir. make it behaves as if I put the link in url tab)
Posted
Comments
Sergey Alexandrovich Kryukov 29-Oct-14 2:29am    
It can play it, I tried. How can we know what did you screw up?
One question for you: did you try to use some working site streaming mp3 and use it in your audio element? Will it work?
—SA
Firo Atrum Ventus 29-Oct-14 18:25pm    
Turns out I just need to reply with 'Cache-Control: no-cache' on response header to prevent FF from doing its shenanigans. So I guess this is answered.
Sergey Alexandrovich Kryukov 29-Oct-14 18:47pm    
Great.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900