node-red-contrib-play-audio
Advanced tools
Comparing version 1.0.0 to 2.0.0
{ | ||
"name": "node-red-contrib-play-audio", | ||
"version": "1.0.0", | ||
"version": "2.0.0", | ||
"description": "A node-red node for playing audio in the browser", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -6,3 +6,5 @@ module.exports = function(RED) { | ||
this.on('input', function(msg) { | ||
RED.comms.publish("playaudio", msg.payload); | ||
if(Buffer.isBuffer(msg.payload)){ | ||
RED.comms.publish("playaudio", msg.payload); | ||
} | ||
}); | ||
@@ -9,0 +11,0 @@ } |
# node-red-contrib-play-audio | ||
Node to play audio from a raw audio buffer. Works well togather with the [Watson Text to Speech node](https://github.com/node-red/node-red-bluemix-nodes/tree/master/watson) | ||
Node to play audio from a raw audio buffer. Works well togather with the [Watson Text to Speech node](https://github.com/node-red/node-red-node-watson/tree/master/watson) | ||
## Install | ||
[Available on npm](https://www.npmjs.com/package/node-red-contrib-play-audio) | ||
Follow general [installation instructions](http://nodered.org/docs/getting-started/adding-nodes) for node-red nodes | ||
### On Bluemix | ||
Download the starter code and insert "node-red-contrib-play-audio" as a dependency in `package.json` | ||
## Requirements | ||
Browser needs to support Web Audio API. | ||
Browser support for Web Audio API. | ||
## Sample flow | ||
http://flows.nodered.org/flow/2b6b1fa3ca62f36854ce |
Sorry, the diff of this file is not supported yet
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
4848
12
17
0