Streaming live audio with jPlayer

寵の児 提交于 2019-12-03 09:46:05

Two things you could check:

Is the path to the swf correct?

Depending on the browser-capabilities jplayer chooses the playback mode (html5/flash). Try using an absolute path for the swf, includeing the file-part - eg:

swfPath:"/static/swf/jplayer.swf"

and make sure that you can access it, in your case maybe something like: http://www.sky.fm/static/swf/jplayer.swf

Do you serve the correct MIME Types?

As written in the Developer Guide you should make sure to propperly set the mimetypes. Not sure if you have an issue there. When checking the mentioned stream with:

curl http://mp3-a8-128.as34763.net:80/;stream/1 

you get:

ICY 200 OK
...
content-type:audio/mpeg
...

The manual tells that you should set audio/mp4 for m4a. (and audio/mpeg is used for mp3)

Maybe you could provide your current code with urls to running streams? This would make it easier to figure out what's going on. (The http://u10.sky.fm:80/sky_the80s does not work - at least for me...)

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!