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 trial

HTML

Track tag is giving me an error--What do I need to do?

Hey guys,

My track tag is giving me an error - "Text track from origin 'file://' has been blocked from loading: Not at same origin as the document, and parent of track element does not have a 'crossorigin' attribute. Origin 'null' is therefore not allowed access". I'm using Sublime and the .vtt file is on my desktop. I've been doing research but I'm using a version of Chrome that should work with it. So, now I'm stuck. Any help would be appreciated. See the markup below:

<track label="English" kind="subtitles" src="captions.vtt" default>

4 Answers

In mozilla they use additional attribute srclang

Unfortunately, still getting the same error with the additional attribute.

Send me the project folder i will work in my end if i find any solution i will get back

Your code works with firefox and you need to check type attr of video in your code

Thanks! Fixed the type attr typo. I'll see what I can do to try to get it to work in Chrome and Safari.

Track tag locally works only in firefox try to use from server side

I'm not sure how to do that...