I am trying to experiment the use of track element. I think my code and .vtt
file are both valid. However I cannot see the subtitles when I run the page (even on the localhost.) I read that the server must be configured so that it can serve the .vtt
file with the correct MIME type. I use Xampp locally what must I do to see the subtitles.
Here is my code and WebVTT file referring a video with the song Twinkle Twinkle Little Star
<!DOCTYPE html>
<html>
<head>
<title>Track</title>
</head>
<body>
<video controls>
<source src="twinkle.mp4" type="video/mp4">
<track src="altyazi_tr.vtt" kind="subtitles" srclang="tr" label="turkce" default>
</video>
</body>
</html>
WEBVTT
00:00:00,000 --> 00:00:03.000
Twinkle Twinkle Little Star
00:00:03,000 --> 00:00:06.000
How I wonder what you are