I am trying to get basic webcam functionality in IE11. I have tried the Flash demo and it is working fine for me. However when I try to embed the webcamjs object into a React application I am getting an error in IE11.
TypeError; Object doesn't support property or method '_snap'.
I stepped through the code in the IE11 Debugger and it appears the _snap, _configure, and _releaseCamera are all shown as a property (not method) in the DOM element returned from getMovie however the values are all null.
Below is a minimal example React component for reproducing the issue. Any idea why this might be failing inside a React container?
Also I have tried replacing document.getElementById with the function below and changing the id attributes to class attributes for the object and embed elements. Same issue.
export default function getElementsByClassName(node, classname) {
var a = [];
var re = new RegExp('(^| )'+classname+'( |$)');
var els = node.getElementsByTagName("*");
for(var i=0,j=els.length; i<j; i++)
if(re.test(els[i].className))a.push(els[i]);
return a;
}
I am trying to get basic webcam functionality in IE11. I have tried the Flash demo and it is working fine for me. However when I try to embed the webcamjs object into a React application I am getting an error in IE11.
TypeError; Object doesn't support property or method '_snap'.
I stepped through the code in the IE11 Debugger and it appears the _snap, _configure, and _releaseCamera are all shown as a property (not method) in the DOM element returned from getMovie however the values are all null.
Below is a minimal example React component for reproducing the issue. Any idea why this might be failing inside a React container?
Also I have tried replacing document.getElementById with the function below and changing the id attributes to class attributes for the object and embed elements. Same issue.