node-red-contrib-play-audio
Advanced tools
Comparing version 2.2.4 to 2.3.0
{ | ||
"name": "node-red-contrib-play-audio", | ||
"version": "2.2.4", | ||
"version": "2.3.0", | ||
"description": "A node-red node for playing audio in the browser", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -19,2 +19,3 @@ /** | ||
module.exports = function(RED) { | ||
var playaudionodeid; | ||
function PlayAudioNode(config) { | ||
@@ -24,2 +25,3 @@ RED.nodes.createNode(this,config); | ||
var node = this; | ||
playaudionodeid = this.id; | ||
this.on('input', function(msg) { | ||
@@ -32,5 +34,11 @@ if (Buffer.isBuffer(msg.payload)) { | ||
} | ||
node.status({fill:"blue",shape:"dot",text:"playing"}); | ||
}); | ||
} | ||
RED.nodes.registerType("play audio", PlayAudioNode); | ||
RED.httpAdmin.get("/playaudio", RED.auth.needsPermission('playaudio.read'), function(req,res) { | ||
var node = RED.nodes.getNode(playaudionodeid); | ||
if (node != null) { node.status({}); } | ||
res.json("OK"); | ||
}); | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19446
56