本文介绍了在html4中嵌入音频的最新技术是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在尝试找到有关如何嵌入音频的最新技术的权威性现代信息,并一直在Flash视频中找到大量最新信息,并且确实有很多有关音频嵌入的老文章和可疑文章(例如,参考IE 3.0).在stackoverflow或doctype上也找不到任何东西.

I've been trying to find a definitive modern source for the state of the art in how to embed audio, and been finding lots of up to date info on flash video, and lots of really old and questionable articles on audio embedding (e.g. with references to IE 3.0). Also haven't been able to find anything here on stackoverflow, or on doctype.

我正在用html4编写,因此显然html5音频标签会很棒,但这对我来说不是解决方案.

I'm writing in html4, so obviously though the html5 audio tag would be great, it's not a solution for me.

那么应该如何嵌入音频以最大化功能和浏览器支持?

So how should audio be embedded for maximizing features and browser support?

我正在使用的特定文件是midi类型,尽管我并不认为这太重要了.

The specific file that I'm working with is a midi type, though I don't expect that's overly important.

推荐答案

在HTML4中,最好的选择可能是<object>,因为在该版本中已不推荐使用<embed>.参见例如通用包含:object元素在HTML4规范中.这样的东西就足够了:

In HTML4, the best thing would probably be an <object>, since <embed> was deprecated in that version. See e.g. Generic inclusion: the object element in the HTML4 specs. Something like this would suffice:

<object data="/path/to/audio.midi" type="audio/midi">
    <p>Fall-back text for browsers that can't handle the MIDI file.</p>
</object>

这篇关于在html4中嵌入音频的最新技术是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-09 21:01