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 trialCheng-Hao Chang
12,976 Pointsafter adding the track in my html file, I got a "crossorigin attribute" error when running the web page.
I check the console and it show me an error as below
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.
Can someone help me out?
2 Answers
Kris Phelps
7,609 PointsThere are lots of security rules around accessing files from the local filesystem on your computer. This makes sense if you think about it, or else any website you went to could start trying to crawl your computer's files and access the data in them.
Have you tried uploading everything to a WorkSpace and see if you have the same problem?
Malith Senanayake
12,488 PointsI encountered the same problem. Follow this link "http://stackoverflow.com/questions/23256830/crossorigin-errors-when-loading-vtt-file" in stackoverflow where you'll find some useful information about the nature of this problem . I followed a simple trick to overcome this situation. I saved all the files in htdocs folder of XAMPP and opened it in the browser as an XAMPP document, and subtitles appeared in the video.