I am trying to record video from user webcam using filepicker.io and store it in my Amazon S3 bucket.
I am stuck up here.Below code works fine in firefox but not on chrome & IE. The abc iframe src is not set by filepicker api, so the contents remain blank. I verified that 3rd part cookies are enabled on chrome. Any help will be highly appreciated.
<html>
<head><title>Test</title></head>
<body>
<iframe id="abc" name="abc" height="500" width="500" frameborder="0"> abc </iframe>
<script src="https://api.filepicker.io/v0/filepicker.js"></script>
<script type="text/javascript">
filepicker.setKey("AeE9yA21xTpiOQ3JQm938z");
// alert('before');
filepicker.getFile(filepicker.MIMETYPES.ALL, {
'multiple': false, 'container': 'abc',
'services':[filepicker.SERVICES.VIDEO]
}, function(response){
alert(JSON.stringify(response));
});
// alert('end');
</script>
</body>
</html>
It looks like the iframe wasn’t included in the DOM yet. It worked for me when I put the javascript code inside the onReady call from jquery:
http://www.filepicker.io/api/file/4wW3A6BwQYaPDNBENcau?dl=false