音频标签在IE9中不起作用 [英] audio tag not working in IE9

查看:95
本文介绍了音频标签在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆