2012-03-17 97 views
2

在Web浏览器中播放流式传输aac广播是否有任何可行的方法? (具体在wii上) 我已经看过flash和VLCJ库,但没有运气。 我知道我去过至少一个网站,通常在浏览器中播放它们的流,但我似乎记得它不适用于wii浏览器。使用soundmanager2将现有的aac流传输到浏览器中

感谢

更新: 我发现所谓的声音管理器2,它声称自己是能够做到这一点有很大的js的工具,但不能得到任何AAC格式的流播放。他们虽然支持。这让我怀疑我是否配置错了。

http://www.schillmania.com/projects/soundmanager2/

<html> 
<head><title>Radio Stations</title></head> 
<!-- include SM2 library --> 
<script type="text/javascript" src="soundmanager2.js"></script> 
<!-- configure it for your use --> 
<script type="text/javascript"> 

soundManager.url = 'sm2-flash-files/'; 

soundManager.debugMode = true; 
soundManager.preferFlash = true; 
soundManager.useFlashBlock = true; 
soundManager.flashVersion = 9; 
soundManager.useHighPerformance = true; 
soundManager.useFastPolling = true; 

soundManager.onready(function(){ 

    var bleh = soundManager.createSound({ 
    id: 'NoLife-Radio', 
    url: 'http://radio.nolife-radio.com:8000', 
    type: 'audio/aac', // 'audio/mp4' ? 
    autoPlay: false, 
    stream: true, 
    autoLoad: true 
    }); 
}); 

soundManager.ontimeout(function(){ 

    // Hrmm, SM2 could not start. Flash blocker involved? Show an error, etc.? 
    alert("Could not start"); 
}); 

</script> 


<body> 
<a href="#" onClick="javascript: soundManager.play('NoLife-Radio');">Play</a> 
</body> 
</html> 

回答

0

用于播放流把;在网址的末尾,这将使它发挥作用。 所以替换此: url: 'http://radio.nolife-radio.com:8000',url: 'http://radio.nolife-radio.com:8000;',

关于格式,像Winamp的播放器播放流,并找出哪些是正确的格式。您也可以将soundManager.preferFlash = false;设置为可以使用HTML5音频API播放声音的浏览器可以使用它而不是Flash。

相关问题