0

我将音频放置在页面上的控制器中,但是当我加载不同的浏览器时,浏览器甚至看不到声音文件,或者它们不起作用。我已将文件转换为 wav。这显然适用于 IE、Opera、Firefox 和 Chrome,但是更改文件格式并不会改变这种情况。我知道它与 HTML 音频标签或其他东西有关,但我仍然不确定

<embed src="../Sounds/home_page_readout.wma" width="405" hidden="false" height="39"   pluginspage="../Plugin/niftyplayer.fla" autoplay="false" controller="true"></embed>
4

2 回答 2

0

根据您部署的控制器,答案是不同的。但是我很确定您的问题与文件格式无关,您应该检查天气不同的浏览器是否可以找到该文件。

作为一般性答案,我喜欢使用一些经过测试的解决方案将音频嵌入到 Niftyplayer 等网页中:

https://github.com/progrium/niftyplayer

于 2012-04-09T13:52:15.023 回答
0

w3schools HTML5 音频元素页面

目前,该元素支持 3 种文件格式:MP3、Wav 和 Ogg:

Browser             MP3 Wav Ogg
Internet Explorer 9 YES NO  NO
Firefox 4.0         NO  YES YES
Google Chrome 6     YES YES YES
Apple Safari 5      YES YES NO
Opera 10.6          NO  YES YES

列出的解决方案是以多种格式提供文件:

<audio controls="controls">
  <source src="song.ogg" type="audio/ogg" />
  <source src="song.mp3" type="audio/mpeg" />
  Your browser does not support the audio element.
</audio>

希望有帮助。

于 2012-04-09T16:34:49.890 回答