HTML - attributes - k....

revision:


"kind" attribute : specifies the kind of text track.

The kind attribute can be used on the <track> element.

syntax

<track src="subtitles_en.vtt" kind="subtitles" srclang="en">

Attribute values:

captions: the track defines translation of dialogue and sound effects (suitable for deaf users).

chapters: the track defines chapter titles (suitable for navigating the media resource).

descriptions: the track defines a textual description of the video content (suitable for blind users).

metadata: the track defines content used by scripts. Not visible for the user.

subtitles: the track defines subtitles, used to display subtitles in a video.

some examples

example

no video available

HTML codes:

                    <video width="320" height="240" controls>
                        <source src="forrest_gump.mp4" type="video/mp4">
                        <source src="forrest_gump.ogg" type="video/ogg">
                        <track src="subtitles_en.vtt" kind="subtitles" srclang="en" label="English">                 
                        <track src="subtitles_no.vtt" kind="subtitles" srclang="no" label="Norwegian">                                        
                    </video>
                

example

no video available

HTML codes:

                    <video width="400" height="300" controls>
                        <track src=Wuzhen-20-10_02.mp4" id="myTrack" kind="subtitles" srclang="en" label="English" default>
                        <source id="myTrack2" src=Wuzhen-20-10_02.mp4" type="video/mp4">          
                    </video>