設置 在我的網站上安裝了Soundmanager2。自動生成到MP3的鏈接。Soundmanager2加載但不玩
的問題 使用360-UI,我看到了聲音加載,因爲它起着就像這個演示的左上角動畫(http://www.schillmania.com/projects/soundmanager2/demo/ 360玩家/),但它不玩,秒計數器不移動。
我怎麼加載PLAYER
<link rel="stylesheet" type="text/css" href="/css/360player.css" />
<link rel="stylesheet" type="text/css" href="/css/flashblock.css" />
<!-- special IE-only canvas fix -->
<!--[if IE]><script type="text/javascript" src="/js/excanvas.compiled.js"></script><![endif]-->
<!-- Apache-licensed animation library -->
<script type="text/javascript" src="/js/berniecode-animator.js"></script>
<script type="text/javascript" src="/js/soundmanager2.js"></script>
<script type="text/javascript" src="/js/360player.js"></script>
<script type="text/javascript">
soundManager.setup({
// path to directory containing SM2 SWF
url: '/swf/', debugMode: true
});
</script>
調試代碼
-- SoundManager 2: HTML5 support tests (/^(probably|maybe)$/i): mp3: true (preferring flash), mp4: true (preferring flash), ogg: true, wav: true -- soundmanager2.js:1155
-- SoundManager 2 V2.97a.20121104 (AS3/Flash 9) + HTML5 audio, high performance mode, normal polling, wmode: transparent, flashBlock mode -- soundmanager2.js:1155
soundManager::createMovie(): Trying to load /swf/soundmanager2_flash9_debug.swf soundmanager2.js:1155
soundManager::initMovie(): Waiting for ExternalInterface call from Flash... soundmanager2.js:1157
soundManager::externalInterfaceOK() (~2 ms) soundmanager2.js:1157
soundManager::init() soundmanager2.js:1157
soundManager: Attempting JS to Flash call... soundmanager2.js:1157
(Flash): SM2 SWF V2.97a.20121104 (AS3/Flash 9) soundmanager2.js:1157
Flash security sandbox type: remote soundmanager2.js:1157
(Flash): JS to/from Flash OK soundmanager2.js:1157
(Flash): Enabling polling, 10 ms interval soundmanager2.js:1157
-- SoundManager 2 loaded (OK) -- soundmanager2.js:1155
soundManager: Firing 1 onready() item soundmanager2.js:1157
threeSixtyPlayer.init() soundmanager2.js:1157
threeSixtyPlayer.init(): Found 5 relevant items. soundmanager2.js:1157
handleClick() soundmanager2.js:1157
soundManager.createSound(): ui360Sound0 (http://clients.activemd.net/external/x.mp3) soundmanager2.js:1155
SMSound() merged options: {
id: ui360Sound0,
url: http://clients.activemd.net/external/x.mp3,
onplay: { pl.removeClass(this._360data.oUIBox,this._360data.className); t... },
onstop: { pl.removeClass(this._360data.oUIBox,this._360data.className); t... },
onpause: { pl.removeClass(this._360data.oUIBox,this._360data.className); t... },
onresume: { pl.removeClass(this._360data.oUIBox,this._360data.className); t... },
onfinish: { var nextLink; pl.removeClass(this._360data.oUIBox,this._360data... },
onbufferchange: { if (this.isBuffering) { pl.addClass(this._360data.oUIBox,pl.css... },
whileloading: { if (this.paused) { self.updatePlaying.apply(this); } }... },
whileplaying: { self.updatePlaying.apply(this); this._360data.fps++; }... },
useWaveformData: 0,
useEQData: 0,
usePeakData: 0,
autoLoad: false,
autoPlay: false,
loops: 1,
multiShot: true,
multiShotEvents: false,
pan: 0,
stream: true,
usePolicyFile: false,
volume: 100,
isMovieStar: false,
bufferTime: 3
} soundmanager2.js:1157
(Flash): SoundManager2_SMSound_AS3: Got duration: 0, autoPlay: false soundmanager2.js:1157
SMSound.play(): Attempting to load "ui360Sound0" soundmanager2.js:1155
SMSound.load(): http://clients.activemd.net/external/x.mp3 soundmanager2.js:1155
SMSound.play(): "ui360Sound0" is starting to play soundmanager2.js:1157
fanOut: ui360Sound0: http://clients.activemd.net/external/x.mp3 soundmanager2.js:1157
SMSound._onbufferchange(): 1 soundmanager2.js:1157
(Flash): start (ui360Sound0): 0 soundmanager2.js:1157
SMSound._onbufferchange(): 0 soundmanager2.js:1157
SMSound._onload(): "ui360Sound0" loaded.
古怪 的鏈接在我的Chrome開發者視圖點擊和MP3在打開單獨的瀏覽器窗口並正常播放(在Chrome中單擊MP3鏈接時默認)
一個可能的理論 聲音正在被加載,但沒有被告知「好吧,繼續,玩自己」。
另一個可能的理論 jQuery是以某種方式與它搞砸。
請幫我確定爲什麼我的聲音加載但沒有播放。
謝謝。 Rick
如果鏈接是可點擊的,但在另一個視圖中打開,請在您的鏈接中添加'type =「audio/mp3」',以便您的瀏覽器識別它的音頻 –