嵌入声音不玩火狐
我使用 Firefox 时无法播放声音。
如果玩IE和Safari!这是代码:
<embed src="http://www.myWebSite.com/Play/Sound/someSound.wav" autostart="false" width="1" height="1"
id="someSound" enablejavascript="true" />
在 JS 的某个地方,我有这样的: playSound("someSound");
function playSound(mySound) {
var snd = document.getElementById(mySound);
try {
snd.Play();
}
catch (e) {
try {
snd.DoPlay(); // Some browsers doesn't understand the Play() command
}
catch (e) {
// Do nothing if no Windows Media Player nor Quicktime installed
}
}
此外
,当我尝试其他一些带有嵌入声音的网站时,它可以播放! 为什么?欢迎任何线索:-)
Sound doesn't play when I use Firefox.
If plays with IE and Safari! Here is the code:
<embed src="http://www.myWebSite.com/Play/Sound/someSound.wav" autostart="false" width="1" height="1"
id="someSound" enablejavascript="true" />
Somewhere in the JS, I have this: playSound("someSound");
function playSound(mySound) {
var snd = document.getElementById(mySound);
try {
snd.Play();
}
catch (e) {
try {
snd.DoPlay(); // Some browsers doesn't understand the Play() command
}
catch (e) {
// Do nothing if no Windows Media Player nor Quicktime installed
}
}
}
Besides, when I try some other website with embedded sound, it plays!
Why? Any clue welcome :-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能缺少 Firefox 的 Quicktime 或 WMP 插件!
Firefox 3.5+ 支持
标签,因此您的或者可以调查一下。
You are probably missing a Quicktime or WMP plugin for Firefox!
Firefox 3.5+ supports the
<audio>
tag so your could alternatively look into that.