音频标签在IE9中不起作用 [英] audio tag not working in IE9
问题描述
我正在尝试使用音频标签。
I'm experimenting with the audio tag.
以下文件适用于谷歌浏览器,但不适用于IE9。我总是得到不支持音频标签。我也试过wav,flac,wma - >结果相同。
The file below does work in Google Chrome, but not in IE9. I'm always getting "audio tag not supported". I also tried wav, flac, wma --> same result.
我怀疑可比性模式可能存在一些问题,但我找不到改变它的地方。
I suspect there might some issue with the compaitibility mode, but I don't find where to change it.
有人可以帮忙吗?
亲切的问候
Georg
Can anyone help? Kind regards Georg
<html>
<head>
</head>
<body>
<audio controls="controls" src="c:\concerto.mp3" >
audio tag not supported.
</audio>
</body>
</html>
推荐答案
将HTML5文档类型添加到页面中,它应该触发IE9中的标准模式。您还应该为使文档有效添加标题元素:
Add the HTML5 doctype to the page and it should trigger standards mode in IE9. You should also add a title element to make the document valid:
<!DOCTYPE html>
<html>
<head>
<title>Add a title</title>
</head>
<body>
<audio controls="controls" src="c:\concerto.mp3" >
audio tag not supported.
</audio>
</body>
</html>
如果您仍遇到问题,请尝试将此元标记添加到头部:
If you're still having trouble, try adding this meta tag to the head:
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
这篇关于音频标签在IE9中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!