浏览器如何识别视频?

时间:2017-07-21 13:46:14

标签: html video

搜索引擎如何识别视频?
img标签有alt属性:

<img src="smiley.gif" alt="Smiley face" height="42" width="42">

链接标记的标题为:

<a href="www.apple.com" title="title of the link">this is a link</a>

视频标签怎么样? 我一直在寻找,似乎没有任何属性可以提供帮助 浏览器识别视频
https://www.w3.org/wiki/HTML/Elements/video
https://www.w3schools.com/tags/tag_video.asp

<video width="320" height="240" controls>
  <source src="movie.mp4" type="video/mp4">
  <source src="movie.ogg" type="video/ogg">
  Your browser does not support the video tag.
</video>

甚至没有嵌入YouTube:

<iframe width="560" height="315"
src="https://www.youtube.com/embed/zuCJYhLCN4E" frameborder="0" allowfullscreen
</iframe>

2 个答案:

答案 0 :(得分:0)

当使用HTTP检索资源时,会返回一个Content-Type标头,该标头定义位于URL后面的内容类型。

此标题为客户提供了如何处理图像或视频或任何其他类型数据的线索。因此,搜索引擎可以绕过文档中描述的资源并确定它们实际上是否是视频。

答案 1 :(得分:0)

使用itemtype="http://schema.org/VideoObject架构的页内标记:

  

页面标记是隐藏的描述性数据,添加到网页的源代码中。 Google建议使用schema.org,这是一种新的标记格式,经过协作设计,并得到Google,Bing和Yahoo的支持!

请参阅here

(该页面上指向www.schema.org的链接已损坏,它们应该只是schema.org /)