Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
  • How to add subtitles in html5 videos tags ??

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 280
    Comment on it

    Hello Everyone !!

    The <track> tag is use to add subtitle file to the <video> in HTML5. The <track> tag has following attribute:

    • Kind(gives the value of subtitle, indicating the type of content the files contain ).
    • Label( gives subtitle language information).
    • src( source file path).
    • srclang(indicates what language each subtitle files' contents are in).
    • default. 


    <video id="video" controls preload="metadata">
       <source src="video/sintel-short.mp4" type="video/mp4">
       <source src="video/sintel-short.webm" type="video/webm">
       <track label="English" kind="subtitles" srclang="en" src="captions/vtt/sintel-en.vtt" default>
       <track label="Deutsch" kind="subtitles" srclang="de" src="captions/vtt/sintel-de.vtt">


 0 Comment(s)

Sign In

Sign up using

Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: