Home > database >  real example for <track kind="chapter">
real example for <track kind="chapter">

Time:09-29

Coud anyone show me the real example, when used "chapter" value in "track" element. If you could, please help me.

I try in my server this example, but it doesn't show any result`

 <body> 

<video width= "500" height= "400" controls>
    <source src= "html-lesson.mp4" type= "video/mp4">
    <track src="html-lesson-hy.vtt" kind= "chapter" srclang= "hy" label= "Armenian">
    <track src="html-lesson-en.vtt" kind= "chapter" srclang= "en" label= "English" default>
</video>

CodePudding user response:

Please use kind="chapters" instead of chapter. You can use this link to know more about it. https://www.w3schools.com/tags/tag_track.asp

CodePudding user response:

There are two really great resources for learning modern HTML:

From this, we can learn two things:

  • Firstly, the valid value for the "kind" attribute is "chapters", not "chapter".
  • Secondly, the standard describes this track kind as "Chapters metadata", noting it is "Tracks intended for use from script. Not displayed by the user agent."

So, you need to correct your HTML, and then write some additional script to make use of the chapter data.

  • Related