How to get content type from ShoutCast 7.html

Here I am developing a radio, radio communication can be in aacp, aac or mpeg format. I use MultiPlayer jar to play aacp format and using Default MediaPlayer to play mpeg format, I know that MultiPlayer can play both formats, but I used a different jar according to client requirements, is there a way to find out the streaming url - aacp, aac or mpeg from the ShoutCast page 7.html?

thanks

+6
source share
1 answer

No, 7.html does not contain a stream content type.

 <HTML><meta http-equiv="Pragma" content="no-cache"></head><body>9,1,47,50,9,56,</body></html> 

What you need to do is make a request for the stream and disconnect after the completion of the response headers. (after you see \r\n\r\n from the server.) Extract the content type from these headers. This ensures that you have the right type of content, and make sure that you are compatible with all types of HTTP and HTTP streaming servers, including Icecast.

I don’t know why you want to do this, but the admin page will be the only available source. You can access it without credentials, but you have HTML parsing. Again, this will only be compatible with SHOUTcast servers. You must not do this.

 <tr><td width=100 nowrap><font class=default>Content Type: </font></td><td><font class=default><b>audio/mpeg</b></td></tr> 
+1
source

All Articles