JSFiddle - React, Tailwind, and code Playground

by morphcast

HTML

<body>
<script src="https://ai-sdk.morphcast.com/v1.16/ai-sdk.js"></script>
<script>
CY.loader()
  .licenseKey("9087cfd2037a28a79769fdcaa4962252379cd2e2fd0b")
  .addModule(CY.modules().FACE_AROUSAL_VALENCE.name, {smoothness: 0.70})
  .addModule(CY.modules().FACE_ATTENTION.name, {smoothness: 0.83})
  .addModule(CY.modules().DATA_AGGREGATOR.name, {initialWaitMs: 2000, periodMs: 1000})
  .load()
  .then(({ start, stop }) => start());

window.addEventListener(CY.modules().EVENT_BARRIER.eventName, (evt) => {
  console.log('EVENT_BARRIER result', evt.detail);
});

window.addEventListener(CY.modules().DATA_AGGREGATOR.eventName, (evt) => {
  console.log('DATA_AGGREGATOR result', evt.detail);
});


</script>

<!-- your body part -->

</body>