JSFiddle - React, Tailwind, and code Playground

by morphcast

HTML

<script>
class ScriptLoader{static loadScript(t,e=null){return new Promise((a=>{const r=document.createElement("script");r.type="text/javascript",r.readyState?r.onreadystatechange=function(){"loaded"!==r.readyState&&"complete"!==r.readyState||(r.onreadystatechange=null,a())}:r.onload=function(){a()},e&&r.setAttribute("data-config",e),r.src=t,document.getElementsByTagName("head")[0].appendChild(r)}))}}ScriptLoader.loadScript("https://sdk.morphcast.com/emotion-statistics/stage/script.js").then((()=>{new MorphCastStatistics.QuickSetup({token:"fds0uw2v2ut9732522694rrtuw96797r82r7302uwt780906",moduleNames:["FACE_AROUSAL_VALENCE","FACE_ATTENTION","FACE_WISH","FACE_AGE","FACE_FEATURES","DATA_AGGREGATOR","FACE_POSITIVITY"],privacyPopupText:{title:"Allow us to use your camera",description:"This experience is designed to be viewed with your camera on. The next screen will ask your consent to access data from your camera.",url:"https://YOUR_DOMAIN/<YOUR_PRIVACY_POLICY>"},hasCompatibilityAlert:!0,sendDatainterval:5e3,tickInterval:1e3,stopAfter:72e5}).start()}));
</script>