我的猜测是它不起作用,因为soundManager
设置进行了两次:一次在inlineplayer.js
...
soundManager.debugMode = true; // disable or enable debug output
soundManager.useFlashBlock = true;
soundManager.url = '../../swf/'; // path to directory containing SM2 SWF
// optional: enable MPEG-4/AAC support (requires flash 9)
soundManager.flashVersion = 9;
soundManager.useMovieStar = true;
// ----
soundManager.onready(function() {
if (soundManager.supported()) {
// soundManager.createSound() etc. may now be called
inlinePlayer = new InlinePlayer();
}
});
...并再次与 HTML 本身内联:
soundManager.url = 'soundmanager/swf/';
soundManager.flashVersion = 9; // optional: shiny features (default = 8)
soundManager.useFlashBlock = true; // optionally, enable when you're ready to dive in
// enable HTML5 audio support, if you're feeling adventurous. iPad/iPhone will always get this.
//soundManager.useHTML5Audio = true;
// (cut)
soundManager.onready(function() {
if (soundManager.supported()) {
alert('Yay, SM2 loaded OK!');
} else {
alert('Oh snap, SM2 could not start.');
}
});
设置冲突,我想soundManager.url
来自 HTML 是正确的,但其他一切都应该来自inlineplayer.js
. 根据需要进行编辑,直到每个参数只设置一次。