Socket
Socket
Sign inDemoInstall

react-ssml-dom

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-ssml-dom

A proof of concept react host implementation for ssml strings


Version published
Weekly downloads
1
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

ReactSSML

Hello World SSML

🌟 Quick Start

Get the source code

git clone https://github.com/andrelandgraf/react-ssml-dom.git

Build the demo

npm run build:demo

Run the demo

npm run start:demo

> react-ssml@1.0.0 start:demo /Users/anlandg/workspaces/react-ssml
> node dist/main.js

Express backend listening on port 8888! 🚀

Express server is now running on port 8888!

Use Postman or a tool of your choice to hit the fulfillment endpoint.

curl -X POST http://localhost:8080/api/login/

And there we go!

{
  "reply": "<speak> <audio src=\"https://s3-bucket.com/mock-song.ogg\">  Oh, I am sorry, this file seems not to work, please try another song</audio> </speak>"
}

🔍 How it works

This project is using react-reconciler to implement a custom renderer for React.

See: ./src/ReactSSML.js which replaces react-dom

On top of that this project implements a (proof-of-concept) version of the web's DOM for SSML.

See: ./src/ssml-dom/*

The demo folder contains a demo React App. The demo express server runes via .index.js

Set receivedError in ./demo/Reply.jsx to true and see how the response SSML changes.

Also, try to set the timeout time in ./demo/Reply.jsx from 3000 to 8000 which is higher as our global timeout in index.js. See what happens to get an idea of how this project works.

FAQs

Package last updated on 25 Aug 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc