Read the statement by Michael Teeuw here.
MMM-Myvoiceradio with button
-
Hello,
I need help, I will use the MMM-Myvoiceradio module with buttons not this microphon.I have make buttone with MMM-Buttons for
Sender+ to switch to the next sender and
Sender- to switch to the previous sender
VolumeUp to make a higher Volumen and
VolumeDown to make a lower Volumen
and radiostop for stop the radio.
And have change the MMM-Myvoiceradio.js
but nothing works.
But I muss learn a lot of JavascriptModule.register(“MMM-Myvoiceradio”,{
// Default module config.
// defaults: { text: “Sender1: BigFM”
Sender2: Einslive
// },notificationReceived: function(notification, payload, sender) {
var self = this;
Sender = 0;
If (notification === “Sender+”){
Sender = Sender+1;
If (Sender > 2){
Sender = 1;
}
}
If (notification === “Sender-”){
Sender = Sender-1;
If (Sender < 1){
Sender = 2;
}
}if (Sender === 1){
self.sendSocketNotification(‘einslive’, {});
}
if (Sender === 2){
self.sendSocketNotification(‘bigfm’, {});
}
if (notification === “VolumeUp”){
self.sendSocketNotification(‘VolumeUp’, {});
if (notification === “VolumeDown”){
self.sendSocketNotification(‘VolumeDown’, {});if (notification === “radiostop”){
self.sendSocketNotification(‘radiostop’, {});
}},
// Override dom generator. getDom: function() { var wrapper = document.createElement("div"); wrapper.innerHTML = this.config.text; return wrapper; }});
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login