karlheyes / icecast-kh

KH branch of icecast
GNU General Public License v2.0
298 stars 106 forks source link

Problems with JW Player in KH5 and KH6 #51

Closed sdt105 closed 11 years ago

sdt105 commented 11 years ago

Maybe there is a bug when updating from KH3 to KH5: When using JW-Player (a very commonly-used flashplayer, see link: http://www.longtailvideo.com/jw-player/) and Icecast233KH3, everything works fine. But when i use KH5 oder KH6 instead, mp3 streams won't start in the JW Player. You see only Buffering-messages, but the stream never stops. Is there any idea where the problem comes from?

sdt105

karlheyes commented 11 years ago

I've just tried with jwplayer6 and my current github code using a style like

and

both seem to work, I cannot comment if the latter leaks memory in the browser like before but either option plays back here in version 6. This assumes that the flash and html are on webroot of course.

karl

karlheyes commented 11 years ago

from the look of it, on v6, using mp3 does not request metadata inserts so I suspect still has an issue of leaking memory as well. One interesting point is the FLV with this version now triggers the metadata javascript handler for the linux flash build, it had a problem with that on earlier versions as those callbacks never got called.

karl.

sdt105 commented 11 years ago

there is a new information: the problem seems to appear only in Mozilla Firefox!

karlheyes commented 11 years ago

as already mentioned, I tried the above code against current github and in FF 19.0.2 and worked fine, what other information do you have to add onto that?

karl.

karlheyes commented 11 years ago

could the problem be down to a missing crossdomain.xml that flash is requesting from icecast?

karl.

karlheyes commented 11 years ago

I just tried the link you sent me via email and it is showing up a missing crossdomain.xml and the request is for

GET /mp3-radiobob HTTP/1.1 Host: 85.239.107.149 ...

No metadata inserts requested and it's not FLV wrapped so the response looks like

HTTP/1.0 200 OK Content-Length: 221183499 Content-Type: audio/mpeg ... then what looks like valid mp3 data. My initial guess would be the missing crossdomain.xml but I would not recommend using straight ADTS mp3 to flash because of the browser leak created when using flash, add the type=flv or type=.flv to the request.

karl.

Matthias78 commented 11 years ago

OK, meanwhile the crossdomain.xml does exist. ;)

What does " add the type=flv or type=.flv to the request" mean? Does Icecast wrap the stream to flv although it is not configured in icecast.xml?

Matthias

karlheyes commented 11 years ago

the request I made earlier was reporting a 404 for the crossdomain.xml but if you have added it then fine.

the type tells icecast to wrap the mp3 or aac frames in an FLV container, which magically makes flash take the stream with metadata updates without leaking memory. What jwplayer does in such cases I do not know, some reopen the connection after some time. I suspect flash is creating a cached copy that it could in theory seek into it but obviously that does not work well enough in streaming cases.

karl.

sdt105 commented 11 years ago

Thx Karl. The Problem seems to be solved in JW Player V6.