播放声音文件不适用于除 IE 之外的所有浏览器
我有这条线
<EMBED NAME=""mySound"" SRC=""DocID2858_voice-message.wav"" LOOP=FALSE AUTOSTART=True HIDDEN=TRUE MASTERSOUND>
它适用于 ie 但不适用于其他浏览器。 有什么办法可以做到这一点吗?
I have This line
<EMBED NAME=""mySound"" SRC=""DocID2858_voice-message.wav"" LOOP=FALSE AUTOSTART=True HIDDEN=TRUE MASTERSOUND>
It works for ie but doesn't work for rest of browser.
is there any way to make that.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您使用 IE 8、Firefox 3.5 及更高版本、Safari 4、Google Chrome,那么您会知道这些浏览器支持 HTML 5。
对于 HTML 5,请使用
< /代码> 标签。更多信息请参见此处。
If you're using IE 8, Firefox 3.5 and higher, Safari 4, Google Chrome, then you'll be aware that these browsers support HTML 5.
For HTML 5 use the
<audio></audio>
tag. More information can be found here.你的报价加倍了。我很惊讶这在 IE 中仍然有效!
如果必须使用
标记,则语法为:
type
属性对于防止 IE 中不必要的双重获取是必要的。mastersound
是 Netscape 4 的废话,如今没有任何支持。loop
和autostart
并未得到普遍支持。autostart
是普遍讨厌的。无论如何,我强烈建议不要使用
这些天。或者甚至是嵌入媒体播放器的最新
明天,HTML5
You've doubled your quotes. I'm amazed if this still works in IE!
If you must use an
<embed>
tag, the syntax would be:The
type
attribute is necessary to prevent an unnecessary double-fetch in IE.mastersound
was a Netscape 4 nonsense supported by nothing today.loop
andautostart
are not universally supported.autostart
is universally hated.Anyhow I'd strongly recommend against using
<embed>
these days. Or even the more up-to-date<object>
way of embedding a media player. Embedded media players are fragile. They're often user-hostile or unreliable or just not present at all. Today, most authors use a Flash player to play back MP3 instead. (It's possible to play back WAV, but it's not very nice.)Tomorrow, HTML5
<audio>
elements will be used instead. It is possible to use<audio>
with fallback to Flash today, but this will mean having more than one audio format on the server.