title: Displaying .vtt subtitles using local files only (ie fixing false cross-origin error)
body: <p>I am working on a webpage which serves as a front for a series of documentary videos which will be burned to DVD. We wanted to take advantage of the superior compression of webm videos and the lightweight multi-language solution that .vtt files offer.</p>
  
  <p>However, in Chrome I receive the following error.</p>
  
  <blockquote>
    <p>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.</p>
  </blockquote>
  
  <p>Chrome apparently thinks my index.html is a different origin to my .vtt file which is in the exact same local folder. This is supposedly the case for one other browser too (though I can't remember which one).</p>
  
  <p>Seeing as the final product has to be able to run locally on any user's system, the following solutions are <strong>not applicable in my case</strong>:</p>
  
  <ul>
  <li>Uploading to a web server, which would fix it. (In my case it has to run from a DVD.)</li>
  <li>Setting Chrome to allow file access from files, which is great for if you want to test something locally. (<a href="http://www.chrome-allow-file-access-from-file.com/" rel="nofollow">http://www.chrome-allow-file-access-from-file.com/</a>) (But I don't want each DVD user to hack their browser.)</li>
  <li>Fiddling with .htaccess (Works on a webserver, but as far as I understand, these files don't work locally. Sorry I couldn't remember the link for this solution.)</li>
  <li>Baking the subtitles into the videos (not enough space on DVD for all languages).</li>
  </ul>
  
  <p>I am using video.js but would be happy to look at a different framework if it could fix this problem. Also happy to use other types of subtitles (ie .srt) or something that doesn't track tags inside the video tag.</p>
  
  <p>Some solutions mention enabling CORS (<a href="http://enable-cors.org/" rel="nofollow">http://enable-cors.org/</a>). Does it work on local .vtt files or is it a wild goose chase?</p>
  
  <p>Thanks in advance for your time!</p>