title: How do I bypass a same origin policy violation for one local file to another?
body: <p>I'm trying to semi-recreate Mozilla's <a href="https://developer.mozilla.org/en/manipulating_video_using_canvas" rel="nofollow noreferrer">demo</a> usage of JavaScript + <code>&lt;video&gt;</code> + <code>&lt;canvas&gt;</code> with files that aren't hosted on a server.</p>
  
  <p>Loading my document causes the error console to report this error:</p>
  
  <blockquote>
    <p>Error: uncaught exception: [Exception... "Security error"  code: "1000" nsresult: "0x805303e8 (NS_ERROR_DOM_SECURITY_ERR)"  location: "file:///media/disk/javascript/html5/chromakey/chromakey1.htm Line: 23"]</p>
  </blockquote>
  
  <p>Here's line 23:</p>
  
  <pre><code>this.referenceImageData = this.bCtx.getImageData(0, 0, this.bufferCanvas.width, this.bufferCanvas.height);
  </code></pre>
  
  <p>It's trying to get the image data from a canvas to which I previously copied a frame of video like this:</p>
  
  <pre><code>this.bCtx.drawImage(this.inputElement,
      0, 0,
      this.inputElement.width, this.inputElement.height,
      0, 0,
      this.bufferCanvas.width, this.bufferCanvas.height
  );
  </code></pre>
  
  <p>Where <code>this.inputElement</code> references this (fairly boring) element:</p>
  
  <pre><code>&lt;video id="MainInput" src="320x240.ogg" width="320" height="240"&gt;&lt;/video&gt;
  </code></pre>
  
  <p>Is there any way to get past this error without signing my code with a JAR?</p>
  
  <p>I think it has to do with Firefox's same origin policy (<a href="https://developer.mozilla.org/en/Same_origin_policy_for_JavaScript" rel="nofollow noreferrer">https://developer.mozilla.org/en/Same_origin_policy_for_JavaScript</a>) having an issue local file access, but I can't figure out where to go from there.</p>