在线流媒体是如何继续播放的;同时刷新页面


How does online streaming still play; while page is refreshed?

我的互联网收音机需要一些帮助,每次刷新页面都需要一些时间才能播放。即使我刷新它,我如何才能让它持续播放??

谢谢,这是我的代码:

<div class="col c2">
  <h2><span>Live Streaming</span> </h2>
     <div id="container">
          <a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.
          <a href="http://www.shouthost.com/">Shoutcast &amp; Icecast Server</a>     
      </div>
      <script type="text/javascript" src="http://www.shouthost.com/freeflashplayer/player/swfobject.js"></script>
      <script type="text/javascript">
 var s1 = new SWFObject('http://www.shouthost.com/freeflashplayer/player/player.swf',
 'player',"340","32","9","#FFFFFF");
 s1.addParam("allowfullscreen","true");
 s1.addParam("allowscriptaccess","always");
 s1.addParam("flashvars","skin=http://www.shouthost.com/freeflashplayer/skins/modieus.swf&title=Live Stream&type=sound&file=http://78.129.163.82:10729/;stream.mp3&13202692901&duration=99999&id=scplayer&autostart=true");
 s1.write("container");
      </script>   
      <script type="text/javascript" src="https://hosted.muses.org/mrp.js"></script>
      <script type="text/javascript">
MRP.insert({
'url':'http://78.129.163.82:10729',
'codec':'mp3',
'volume':100,
'autoplay':true,
'buffering':5,
'title':'RADIO APOSTLE 102.6 MHZ',
'bgcolor':'#12880C',
'skin':'simple-red',
'width':300,
'height':122
});
        </script>
</div>

您不能,除非您通过ajax刷新页面并以这种方式将内容加载到页面中。

为什么要刷新页面?

基本上有三个选项:

  1. 在单独的新浏览器窗口中打开您的播放器
  2. 创建一个将成为单页应用程序的网站(https://en.wikipedia.org/wiki/Single-page_application),所以浏览器将所有内容都保存在一个页面上,而不会真正刷新它
  3. 创建一个有两个框架的页面-一个是播放器,另一个是整个网站