问题描述
我有以下标记,使用播放器实现(我也可以包含js,如果它成为必要):
I have the following markup, implemented using the VideoJS player (I can include the js too, if it becomes necessary):
<video id="example_video_1" class="video-js" width="736" height="352" controls="controls" autoplay="autoplay" loop="loop">
<source src="a/v/jt_homevid.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"'>
<source src="a/v/jt_homevid.ogg" type='video/ogg; codecs="theora, vorbis"'>
<object id="flash_fallback_1" class="vjs-flash-fallback" width="736" height="352" type="application/x-shockwave-flash" data="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf">
<param name="movie" value="http://releases.flowplayer.org/swf/flowplayer-3.2.1.swf" />
<param name="allowfullscreen" value="true" />
<param name="flashvars" value='config={"playlist":["<? echo $currurl; ?>/a/v/slide-1-joshtaerk-cdcover.jpg", {"url": "<? echo $currurl; ?>/a/v/jt_homevid.mp4","autoPlay":false,"autoBuffering":true}]}' />
<img src="a/v/slide-1-joshtaerk-cdcover.jpg" width="736" height="352" alt="Poster Image" title="No video playback capabilities." />
</object>
</video>
目前这是HTML验证失败,并出现以下错误消息:
And this is currently failing HTML validation, with the following error message:
我明白我可能不应该相信W3C HTML5验证器在它的开发过程中,但是如果我错误编码,我想确定将来在哪里以及如何防止它。此外,我想确定我正确地解释了错误消息,我认为这应该发生在路上。
I do understand that I maybe should not be trusting the W3C HTML5 validator at this point in it's development, but if I have miscoded, I would like to identify where, and how to prevent it in the future. Also, I'd like to be sure I am interpreting the error message correctly, which I think should happen along the way.
我看不出我是如何偏离的允许此元素的上下文。它是媒体元素的子元素(特别是< video>
标记),它在我认为的任何流内容之前,因为我找不到< source>
元素在W3C上列为流内容(在),我目前没有任何< track>
元素。
I cannot see how I have deviated from the allowed contexts for this element. It is a child of a media element (Specifically the <video>
tag), it is before any 'flow content' I believe, because I cannot find the <source>
element listed as flow content on the W3C (at this link), and I do not have any <track>
elements currently.
我不确定的一件事是< video>
元素的内容模型中'then transparent'的定义。根据我的理解,如果媒体元素内的元素在媒体元素的父元素内也是有效的(来自这个帖子:),这可能是我错过的地方,因为我在< video> 元素>< div> 父?
One thing I'm not certain about is the definition of 'then transparent' in the content model for the <video>
element. From my understanding is that if elements inside the media elements are valid if they are also valid inside the parent of the media element (from this thread: Can I have multiple src attributes in an HTML5 <audio> element? Or an src attribute and a <source> element?), and this is perhaps where I've misstepped, as I have the <video>
element inside a <div>
parent?
任何人都可以确认这是我的错误,或者我是否应该忽略验证消息?如果这是一个错误,我还应该如何布置我的内容?通过直接设置视频元素的样式?
Can anyone confirm this as my mistake, or whether I should ignore the validation message? If this is a mistake, how else should I be laying out my content? By styling the video element directly?
提前致谢。
推荐答案
您的理解是正确的,这看起来像验证器错误。
Your understanding is correct, and this does look like a validator bug.
,它基于相同的验证器引擎作为W3C验证器,但可能是更高版本,通过标记没有任何错误。
Validator.nu, which is based on the same validator engine as the W3C validator, but is likely to be a later version, passes the mark-up without any errors.
这篇关于HTML5视频验证错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!