JSFiddle - React, Tailwind, and code Playground
HTML
<script src="//api.filepicker.io/v0/filepicker.js"></script>
<button id="button">Click</button>
JavaScript
filepicker.setKey('Ak7-ouGNkSvqRjtDbWZi5z');
$('#button').click(function(){
filepicker.getFile(['image/*'], {
'multiple': false,
'container': 'modal',
'location': filepicker.SERVICES.WEBCAM,
'services':[
filepicker.SERVICES.WEBCAM,
]
}, function(response){
var video = JSON.stringify(response);
console.log(response);
});
return false;
});