dsilhx5830 2014-06-29 21:03
浏览 86
已采纳

使用PHP和/或jQuery检查SHOUTcast服务器上的可用侦听器插槽

We have a radio station using SHOUTcast to broadcast with. Links on our website are currently pointed at playlist files. The site is non-responsive and very out-of-date so I'm re-building it and am putting an HTML 5/jQuery player on the pages. All works fine but I've noticed that the better quality 128k stream only has 25 available listener slots. The second stream is 64k and has 100. Obviously, I would rather use the 128k where possible but looking at the listener peaks of both, it adds to 31 (more than 25) so this means potentially we will have all 25 slots used up and someone else may come to the site and the player probably won't play for them.

In this case I would like to just play the 64k stream instead. No matter how likely/unlikely this event may be, I still think I need to check if any slots are available on the 128k stream and push the 64k stream to the player if the 128k stream is full.

Using PHP and/or jQuery. How can i check the SHOUTcast server available listener slot counts?

  • 写回答

1条回答 默认 最新

  • drkrsx3135168 2014-06-30 01:27
    关注

    Even if you were to check for available slots, there is no guarantee that someone won't begin streaming at the same time, causing an error.

    The proper way to handle the situation is to attempt a connection to your 128k stream, and fall back to the 64k stream if there is an error. If you are using the HTML5 audio methods, there are several errors you can handle.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 matlab计算中误差
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊