在 HTML5 中嵌入 mov。验证问题!
我正在尝试在 DOCTYPE 为 HTML5 的网页中嵌入 .mov 视频,代码为:
<script type="text/javascript">
QT_WritePoster_XHTML('Click to Play', '...', '...',
'400', '300', '',
'controller', 'true',
'autoplay', 'true',
'bgcolor', 'black',
'scale', 'aspect');
</script>
<noscript>
<object width="400" height="300" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="src" value="..." />
<param name="href" value="..." />
<param name="target" value="myself" />
<param name="controller" value="false" />
<param name="autoplay" value="false" />
<param name="scale" value="aspect" />
<embed width="400" height="300" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"
src="..."
href="..."
target="myself"
controller="false"
autoplay="false"
scale="aspect" />
</object>
</noscript>
一切正常,但我遇到验证问题,因为在 HTML5 标准中,标签“object”没有“classid”并且“代码库”属性!
有什么办法可以解决这个问题吗?
提前致谢!
I'm trying to embed a .mov video in a web page whose DOCTYPE is HTML5, the code is:
<script type="text/javascript">
QT_WritePoster_XHTML('Click to Play', '...', '...',
'400', '300', '',
'controller', 'true',
'autoplay', 'true',
'bgcolor', 'black',
'scale', 'aspect');
</script>
<noscript>
<object width="400" height="300" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">
<param name="src" value="..." />
<param name="href" value="..." />
<param name="target" value="myself" />
<param name="controller" value="false" />
<param name="autoplay" value="false" />
<param name="scale" value="aspect" />
<embed width="400" height="300" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"
src="..."
href="..."
target="myself"
controller="false"
autoplay="false"
scale="aspect" />
</object>
</noscript>
All works fine but I've a validation problem because in the HTML5 standard the tag "object" hasn't "classid" and "codebase" attributes!
Is there any way to fix that?
Thanks in advance!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
目前针对 HTML5 进行验证的价值值得怀疑,因为它不稳定。如果它有效(并且它会),那就去做吧。
我相信这个想法是使用 type 属性而不是 classid 属性,但根本不清楚它是否提供相同级别的控制。
HTML5 bugzilla 中有一个与此相关的错误记录 (http:// www.w3.org/Bugs/Public/show_bug.cgi?id=7694),如果您不认为 type 属性是 classid 的令人满意的替代品,您可能愿意为该错误记录做出贡献。
Validating against HTML5 is of dubious value at present, because it is not stable. If it works (and it will), just go for it.
I believe the idea is that you use the type attribute instead of the classid attribute but it is not at all clear whether it provides the same level of control.
There a bug record in the HTML5 bugzilla relating to this (http://www.w3.org/Bugs/Public/show_bug.cgi?id=7694), if you do not believe that the type attribute is a satisfactory replacement for classid, you may like to contribute to that bug record.
如果您想在 HTML5 页面中嵌入 mov,您应该使用 video 标签。代码也少了很多...
If you want to embed a mov in a HTML5 page you should use the video tag. It is a lot less code too...