@cocreate/twilio
Version:
A simple twilio component in vanilla javascript. Easily configured using HTML5 attributes and/or JavaScript API.
48 lines (39 loc) • 1.67 kB
HTML
<html lang="en">
<head>
<title>Twilio</title>
<style type="text/css">
.template {
display: none;
}
</style>
<link rel="manifest" href="/manifest.webmanifest" />
</head>
<body>
<h1>Form Demo</h1>
<!-- we can test this now as there is no action using response... we can reun twiml(xml) and display in a consolelog -->
<form>
<!-- reponse.gather(__props, __param) -->
<div
twilio="response.gather.__props.input"
value="speech dtmf"></div>
<div twilio="response.gather.__props.timeout" value="3"></div>
<div twilio="response.gather.__props.numDigits" value="1"></div>
<!--<input twilio="response.gather.__props.timeout" paceholder="timeout">-->
<!--<input twilio="response.gather.__props.numDigits" paceholder="numDigits">-->
<div twilio="response.gather.say.__props" paceholder="say">
Hello 01-- Say
</div>
<div twilio="response.say" twilio_array="say">
<div twilio="say.__props">Say 1</div>
</div>
<div twilio="response.say" twilio_array="say">
<div twilio="say.__props">Say 2</div>
</div>
<button actions="response">response.gather get twiml</button>
</form>
<!--CoCreateJS-->
<!--<script src="https://CoCreate.app/dist/CoCreate.js" ></script>-->
<script src="../dist/CoCreate-twilio.js"></script>
</body>
</html>