开发者

What is the state of the art for embedding audio in html4?

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.

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?

The specific file th开发者_如何学运维at I'm working with is a midi type, though I don't expect that's overly important.


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>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜