O'Reilly Forums: Security Error Running Videobooth.js - O'Reilly Forums
Page 1 of 1
Security Error Running Videobooth.js
#1
Posted 08 February 2012 - 02:23 PM
var frame = buffer.getImageData(0, 0, bufferCanvas.width, bufferCanvas.height);
The above statement fails with these messages in the Chrome JavaScript console (a similar but less informative message appears in the Firebug console in Firefox):
Unable to get image data from canvas because the canvas has been tainted by cross-origin data.
videobooth.js:195Uncaught Error: SECURITY_ERR: DOM Exception 18
Why does this occur, and is there a workaround?
Thanks.
Larry
The above statement fails with these messages in the Chrome JavaScript console (a similar but less informative message appears in the Firebug console in Firefox):
Unable to get image data from canvas because the canvas has been tainted by cross-origin data.
videobooth.js:195Uncaught Error: SECURITY_ERR: DOM Exception 18
Why does this occur, and is there a workaround?
Thanks.
Larry
#2
Posted 11 February 2012 - 03:26 PM
seltzerl, on 08 February 2012 - 02:23 PM, said:
var frame = buffer.getImageData(0, 0, bufferCanvas.width, bufferCanvas.height);
The above statement fails with these messages in the Chrome JavaScript console (a similar but less informative message appears in the Firebug console in Firefox):
Unable to get image data from canvas because the canvas has been tainted by cross-origin data.
videobooth.js:195Uncaught Error: SECURITY_ERR: DOM Exception 18
Why does this occur, and is there a workaround?
Thanks.
Larry
The above statement fails with these messages in the Chrome JavaScript console (a similar but less informative message appears in the Firebug console in Firefox):
Unable to get image data from canvas because the canvas has been tainted by cross-origin data.
videobooth.js:195Uncaught Error: SECURITY_ERR: DOM Exception 18
Why does this occur, and is there a workaround?
Thanks.
Larry
This occurs if you're not using localhost to serve the files. Are you using a local server?
Elisabeth Robson
Co-founder, WickedlySmart.com
Author: Head First HTML5 Programming, Head First HTML and CSS, Head First Design Patterns
Co-founder, WickedlySmart.com
Author: Head First HTML5 Programming, Head First HTML and CSS, Head First Design Patterns
#3
Posted 12 February 2012 - 09:20 AM
I'm running it by clicking the .html file in Windows Explorer, so the location field contains file:///C:/Users/Larry/Documents/web_%20pages/Head_First_HTML5_Programming/chapter8/videobooth.html.
I'll try running it on localhost and get back to you.
Thanks very much.
Larry
I'll try running it on localhost and get back to you.
Thanks very much.
Larry
This post has been edited by seltzerl: 12 February 2012 - 09:21 AM
#4
Posted 12 February 2012 - 02:24 PM
Beth Robson, on 11 February 2012 - 03:26 PM, said:
This occurs if you're not using localhost to serve the files. Are you using a local server?
Beth,
I just tried it under a local Tomcat ( http://localhost:808...videobooth.html ) and it worked as expected. Thanks again.
Larry
#5
Posted 28 February 2012 - 08:41 AM
seltzerl, on 12 February 2012 - 02:24 PM, said:
Beth,
I just tried it under a local Tomcat ( http://localhost:808...videobooth.html ) and it worked as expected. Thanks again.
Larry
I just tried it under a local Tomcat ( http://localhost:808...videobooth.html ) and it worked as expected. Thanks again.
Larry
Great!! glad to hear it :-)
Elisabeth Robson
Co-founder, WickedlySmart.com
Author: Head First HTML5 Programming, Head First HTML and CSS, Head First Design Patterns
Co-founder, WickedlySmart.com
Author: Head First HTML5 Programming, Head First HTML and CSS, Head First Design Patterns
Share this topic:
Page 1 of 1


















