[英]<audio> tag in JSF page
I want to display an audio file in a JSF file, and this is my code. 我想在JSF文件中显示音频文件,这是我的代码。 The problem is that, in my Eclipse editor, it always reminds that "Unknown tag (audio). " with a yellow warning in Eclipse. 问题是,在我的Eclipse编辑器中,它总是在Eclipse中用黄色警告提示“ Unknown tag(音频)”。 I test it in the web server, can's see anything related to the audio shown on the page. 我在网络服务器上对其进行了测试,可以看到与页面上显示的音频相关的任何内容。
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core">
<!-- The template for our app, defines some regions -->
<body>
<div id="container" align="left">
<div id="header">
<img src="resources/images/logo.png" alt="logo photo" />
</div>
<br />
<div id="content">
<ui:insert name="content" />
</div>
<br style="clear: both" />
</div>
<audio src="resources/audio/test.wav" />
</body>
</html>
As stated by BalusC, this can be resolved by changing the doctype to 如BalusC所述,可以通过将doctype更改为
<!DOCTYPE html>
JSF can work with it. JSF可以使用它。
See also: 也可以看看:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.