Sound Manager 2 基本示例重定向问题(mp3 在单独页面上)

发布于 2024-10-07 23:33:32 字数 526 浏览 4 评论 0原文

我正在尝试实现以下带有 Sound Manager2 的音频示例:

www. shillmania/projects/soundmanager2/demo/play-mp3-links/basic.html

我认为在检查调试信息时我已经正确链接了所有文件, 但该页面将我重定向到单独页面中的 Quicktime 链接。

文档指出:“SoundManager 2 拦截对 MP3 链接的点击并内联播放它们。脚本为链接分配额外的 CSS 类以指示其状态(播放/暂停等)”

  1. 我缺少什么?
  2. 我可以在 inline.js 中用鼠标悬停事件替换单击事件吗?或者这需要重大重写?我的目标是在所有浏览器的菜单上的鼠标悬停事件上播放快速的声音效果,并提供回退。

    http://www.canvaskit.com/audio_html5/

感谢您的任何意见,谢谢!

I'm trying to implement the following Audio w/ Sound Manager2 example:

www. shillmania/ projects/ soundmanager2/ demo/ play-mp3-links/ basic.html

I thought I had all the files correctly linked as the debug information is checking out,
but the page is redirecting me to a quicktime link in a separate page.

The documentations states: "SoundManager 2 intercepts clicks to MP3 links and plays them inline. The script assigns additional CSS classes to the links to indicate their state (playing/paused, etc.)"

  1. What am I missing?
  2. Can I replace the click events with mouseover events within inline.js? Or would that require a major re-write? My goal is to play a quick sound effect on mouseover events on my menus across all browsers with fallbacks.

    http://www.canvaskit.com/audio_html5/

I appreciate any input, thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

初熏 2024-10-14 23:33:32

我的猜测是它不起作用,因为 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.');
  }
});

:设置冲突,我认为 HTML 中的 soundManager.url 是正确的,但其他所有内容都应该来自 inlineplayer.js。根据需要进行编辑,直到每个参数仅设置一次。

My guess is that it's not working because the soundManager settings are being made twice: once in 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();
  }
});

...and again inline with the HTML itself:

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.');
  }
});

The settings conflict, and I imagine that soundManager.url from the HTML is correct but everything else should come from inlineplayer.js. Edit as necessary until each parameter is only set once.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文