Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAayush Mitra
24,904 PointsWhat am I doing wrong?
I followed all of the directions in the code, and applied it to my project, but when I click the CC button in the controls, the subtitles do not show up. Here is my code:
<video controls>
<source src="video.mp4" type="video/mp4">
<track src="video.vtt" kind="subtitles" srclang="en" label="English" default>
</video>
WEBVTT:
WEBVTT FILE
0
00:08:00.000 --> 00:20:00.000
HELLO!!!
I would appreciate any help.
Thanks! :)
2 Answers
Alita Edmonds
6,068 PointsHi! Your captions are in the wrong place. It is confusing! The way it works is first comes the milliseconds, then the seconds, then the minutes, then the hours. So in your code, 00:08:00.000 --> 00:20:00.000, you are accidentally saying to display "HELLO!" at 8 minutes through 20 minutes which is to long if you are doing the video that is provided.
This should fix the captions. Hope this Helps!
Alita Edmonds
6,068 PointsYour welcome!
Aayush Mitra
24,904 PointsAayush Mitra
24,904 PointsThank you so much! It makes so much more sense! Thank you!!! :)