Icecast Streaming Media Server Forum Index Icecast Streaming Media Server
Icecast is a Xiph Foundation Project
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Flash Player unable to play stream in some IE installs
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Listener Clients
View previous topic :: View next topic  
Author Message
scangwinnett



Joined: 04 Nov 2006
Posts: 14
Location: Dacula, Georgia

PostPosted: Sat Nov 04, 2006 3:41 am    Post subject: Flash Player unable to play stream in some IE installs Reply with quote

I'm using the Wimpy Player Flash player to allow visitors to my web site to be able to listen to my streams.

I have discovered that in some IE installs the player connects to the Icecast server, sends the HTTP GET request but the Icecast server doesn't send back an HTTP response, instead it appears to start sending the streaming data. Since the client is expecting an HTTP OK response it never starts playing the stream for the listener.

So far I've only seen this problem on a couple of IE6's and one IE7. I haven't seen the problem at all in Firefox.

Here's what the player sends to the Icecast server when it connects in the cases where an HTTP OK response is not sent:
Here's what the player sends to the server when it connects when the HTTP OK response is sent (this here is using Firefox for the browser):
    GET /barrow.mp3 HTTP/1.1\r\n
    Host: icecast.scangeorgia.com\r\n
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1) Gecko/20061010 Firefox/2.0\r\n
    Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5\r\n
    Accept-Language: en-us,en;q=0.5\r\n
    Accept-Encoding: gzip,deflate\r\n
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7\r\n
    Keep-Alive: 300\r\n
    Connection: keep-alive\r\n
    \r\n
Why isn't the Icecast server sending an HTTP OK response in response to the first set of headers above? What is it looking for to be different before it sends a response?

Thanks!
Gordon
Back to top
View user's profile Send private message Visit poster's website
jcr
Modérateur français
Modérateur français


Joined: 14 Apr 2006
Posts: 544
Location: France, Auvergne

PostPosted: Sat Nov 04, 2006 8:09 am    Post subject: Re: Flash Player unable to play stream in some IE installs Reply with quote

As far as I know, and also having some nasty problems with latest IE versions with some Flash applets, it could be a caused by some nasty IE bugs.
You have 2 ways to get rid of those problems. The first and most efficient is editing your HTTPD (web server) configuration and add some BrowserMatcth directives. Here is a sample workaround for Apache2 config:
Code:

BrowserMatch "Mozilla/2" nokeepalive
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0
BrowserMatch "RealPlayer 4\.0" force-response-1.0
BrowserMatch "Java/1\.0" force-response-1.0
BrowserMatch "JDK/1\.0" force-response-1.0

BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully
BrowserMatch "MS FrontPage" redirect-carefully
BrowserMatch "^WebDrive" redirect-carefully
BrowserMatch "^WebDAVFS/1.[0123]" redirect-carefully
BrowserMatch "^gnome-vfs/1.0" redirect-carefully
BrowserMatch "^XML Spy" redirect-carefully
BrowserMatch "^Dreamweaver-WebDAV-SCM1" redirect-carefully

The above code fixes known bugs is some clients, such as downgrading Response handling to HTTP 1.0 convention when the broser is buggy with standard HTTP 1.1

The other workaround would be your applets detecting browser and modifying redirects according to them, but this can be somewhat hairy.
_________________
Epsilon Friends Radio Icecast Radio on CentovaCast admin panel. Icecast hosting
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
scangwinnett



Joined: 04 Nov 2006
Posts: 14
Location: Dacula, Georgia

PostPosted: Sat Nov 04, 2006 3:59 pm    Post subject: Re: Flash Player unable to play stream in some IE installs Reply with quote

jcr wrote:
As far as I know, and also having some nasty problems with latest IE versions with some Flash applets, it could be a caused by some nasty IE bugs.
You have 2 ways to get rid of those problems. The first and most efficient is editing your HTTPD (web server) configuration and add some BrowserMatcth directives. Here is a sample workaround for Apache2 config:

Since the problem is that the Icecast server is not returning the HTTP OK response (instead of a web server) I don't think I this would apply for this situation.

Thanks,
Gordon
Back to top
View user's profile Send private message Visit poster's website
jcr
Modérateur français
Modérateur français


Joined: 14 Apr 2006
Posts: 544
Location: France, Auvergne

PostPosted: Sat Nov 04, 2006 4:01 pm    Post subject: Re: Flash Player unable to play stream in some IE installs Reply with quote

scangwinnett wrote:
jcr wrote:
As far as I know, and also having some nasty problems with latest IE versions with some Flash applets, it could be a caused by some nasty IE bugs.
You have 2 ways to get rid of those problems. The first and most efficient is editing your HTTPD (web server) configuration and add some BrowserMatcth directives. Here is a sample workaround for Apache2 config:

Since the problem is that the Icecast server is not returning the HTTP OK response (instead of a web server) I don't think I this would apply for this situation.

Thanks,
Gordon

Yes, if direct streaming via Icecast, and not forwarding from Apache, you'll have to tweak your applet.
_________________
Epsilon Friends Radio Icecast Radio on CentovaCast admin panel. Icecast hosting
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sat Nov 04, 2006 4:16 pm    Post subject: Reply with quote

I've just tried your posted headers and run against 2.3.1 and it responds just fine. If you are sure that no proxy is involved and the fault is the response part of icecast then capture the network packets for a connection that fails (use tcpdump) taken at the icecast end.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
scangwinnett



Joined: 04 Nov 2006
Posts: 14
Location: Dacula, Georgia

PostPosted: Sat Nov 04, 2006 5:14 pm    Post subject: Reply with quote

karlH wrote:
I've just tried your posted headers and run against 2.3.1 and it responds just fine. If you are sure that no proxy is involved and the fault is the response part of icecast then capture the network packets for a connection that fails (use tcpdump) taken at the icecast end.

There's definitely no proxy involved and I'm using 2.3.1 also.

I have two tcpdump's (the raw data) one where the flash player is running in Firefox and gets the expected "HTTP/1.0 200 OK" response and another where the player is running in IE and doesn't get the response.

More via e-mail...
Back to top
View user's profile Send private message Visit poster's website
Anonymous
Guest





PostPosted: Fri Nov 10, 2006 8:27 pm    Post subject: Reply with quote

Hello,

First, sorry for my english, i'm french Smile

I just wanted to add my experience with the same problem. I made a webradio with flash and icecast. (http://www.ledjamradio.com)

The stream is received but not played with IE7 and some (rare) versions of IE6.

So if anyone find a solution, i would prefer continue to use flash rather than windows media player to play the stream...
Back to top
scangwinnett



Joined: 04 Nov 2006
Posts: 14
Location: Dacula, Georgia

PostPosted: Fri Nov 10, 2006 8:36 pm    Post subject: Reply with quote

Using the tcpdump's I was able to determine that the problem is not with the Icecast server, it's returning the same responses to the Flash player whether it's running in an IE where it plays correctly as well as when it's running in an IE where there's no audio.

I believe the problem is probably with the Flash ActiveX control. I did lots of searching and reading and found where others had the same problem but noone ever solved the problem.
Back to top
View user's profile Send private message Visit poster's website
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Sat Nov 11, 2006 1:40 am    Post subject: Reply with quote

You'll have to report this with Adobe.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Tue Dec 12, 2006 12:16 am    Post subject: Reply with quote

We had this same problem and were pretty disappointed due to the fact we had spent time developing an entire product around the concept of streaming to a flash player on our site.

After some Google detective work we realized that other people were using PHP to pass through headers that IE apparently likes. Instead of following this course, we looked through the headers, and began editing headers returned by Icecast until we found one that worked.

I'd like to add the caveat that we have done zero regression testing after making this change so I have no idea what other parts of Icecast may be impacted by this change. We are using Icecast 2.3.1.

The code edited is found in format_mp3.c and is:
/* hack for flash player, it wants a length */
if (httpp_getvar(client->parser, "x-flash-version"))
{
//bytes = snprintf (ptr, remaining, "Content-Length: 347122319\r\n");
bytes = snprintf (ptr, remaining, "Content-Length: 60000000\r\n");
remaining -= bytes;
ptr += bytes;
}


For some reason, unknown to me, this seems to work. I did notice while using Charles proxy that when a stream is called through Flash in IE with the "347122319" setting the mp3 is buffering in the background continually and does not seem to stop or play at any point.

I hope this helps or sheds light on the subject.
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Tue Dec 12, 2006 1:45 am    Post subject: Reply with quote

This change won't affect icecast in any way, this was just a hack to get flash to even work. If this value works better (even though the content length is silly for this) then I don't see any reason for not having it. The key thing to check though is, does this work in other browser/flash versions.

karl.


Last edited by karlH on Tue Dec 12, 2006 1:06 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Tue Dec 12, 2006 4:23 am    Post subject: Reply with quote

I don't know if this actually works, but I'm going to try this: see below

Quote:
Q Does UFO fix the Active Content issues in the new Internet Explorer update?
A Yes, it does.


http://www.adobe.com/devnet/activecontent/faq.html
http://www.bobbyvandersluis.com/ufo/
Back to top
Anonymous
Guest





PostPosted: Wed Dec 20, 2006 3:52 pm    Post subject: Reply with quote

Hi,

Got the same problem with my flash player and icecast.

After several hours of searching and searching, The only way I found to make it work on IE7 is to wrap the mp3 stream via a PHP script and add the header: Content-length: 9999999999

It's crappy but now it works fine on every browser.

It's like IE7 doesn't forward stream datas with unspecified length to Flash. Maybe a "security feature" Confused

Ps: sorry for my english Embarassed
Back to top
karlH
Code Warrior
Code Warrior


Joined: 13 Jun 2005
Posts: 5476
Location: UK

PostPosted: Wed Dec 20, 2006 7:52 pm    Post subject: Reply with quote

If the player identifies itself as flash then we do currently send a content-length header. Whether the value passed is significant is the question. We can modify the value sent easily as it only applies to that 1 player and is not used by any part of icecast.

karl.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Anonymous
Guest





PostPosted: Mon Dec 25, 2006 2:19 am    Post subject: Icecast vs Internet Explorer 7 patch Reply with quote

This is a copy of my post to icecast-dev list.
I hope this will help you

Hi,

I have patched last night our icecast cluster to be compatible with IE7.

To be able to play icecast streaming inside a flash on IE7 you need :

1. Patch icecast2 to have content-length equal 319324133 (one more will failed)

2. Use javascript to display emb/object of the flash because Microsoft
will not autorun flash anymore (due to legal issue ?)
read http://www.adobe.com/devnet/activecontent/articles/devletter.html

3. flash .swf need to be stored on icecast web directory. Security restriction
like in the java to only open socket on the same host where applet is located.

This is a sample code to play icecast stream in a flash code

stream = new Sound();
domain = new String();
mount = new String();
port = new String();

domain = 'icecast.youdomain';
mount = 'myradio.mp3';
port = '80';

System.security.allowDomain('http://'+ domain);

stream.loadSound('http://'+ domain +':'+ port +'/'+ mount, true);
function callback() {
stream.start();
}
stream.onSoundComplete = callback;
stream.start();


Happy Christmas.


--

Infomaniak Network SA
Guy Baconniere baco at infomaniak.ch
Unix System Administrator
Certified Linux Engineer (RHCE, LPIC-2)
Avenue de la Praille 26
1227 Carouge (Geneva)
Switzerland (CH)
Phone +41 (0)22 820 3541
Fax +41 (0)22 820 3546
AS29222 / BACO-RIPE


--- src/format_mp3.c 2005-09-22 22:19:28.000000000 +0200
+++ src/format_mp3.c 2006-12-22 16:04:43.485964008 +0100
@@ -627,9 +627,11 @@
return -1;

/* hack for flash player, it wants a length */
+ /* IE7/Flash Maximum Content-Length is 319324133 ?? */
+ /* Modified by Infomaniak Network Guy Baconniere */
if (httpp_getvar(client->parser, "x-flash-version"))
{
- bytes = snprintf (ptr, remaining, "Content-Length: 347122319\r\n");
+ bytes = snprintf (ptr, remaining, "Content-Length: 319324133\r\n");
remaining -= bytes;
ptr += bytes;
}
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Icecast Streaming Media Server Forum Index -> Listener Clients All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group
subRebel style by ktauber