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.

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

报告相同问题?

悬赏问题

  • ¥15 乌班图ip地址配置及远程SSH
  • ¥15 怎么让点阵屏显示静态爱心,用keiluVision5写出让点阵屏显示静态爱心的代码,越快越好
  • ¥15 PSPICE制作一个加法器
  • ¥15 javaweb项目无法正常跳转
  • ¥15 VMBox虚拟机无法访问
  • ¥15 skd显示找不到头文件
  • ¥15 机器视觉中图片中长度与真实长度的关系
  • ¥15 fastreport table 怎么只让每页的最下面和最顶部有横线
  • ¥15 java 的protected权限 ,问题在注释里
  • ¥15 这个是哪里有问题啊?