-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I totally love that module and have a small improvement proposal:
I start the stream by pushing a physical push-button mounted on my frame. Sometimes, it takes 3-5 seconds until the stream start after pushing the button. A this is quite a long time one can not be sure if the button might be bouncing and the user pushes again. To acknowledge the button push I inserted an ALERT for the user in MMM-Podcast2.js, indicating that the stream is loading. When the button is pushed again to stop the stream, I added another notification (which I find is not so obstrusive) inidcation that the stream has stopped. Maybe you could include those 2 lines in your next release? I think others would like that, too.
Here the code:
//Helper, to use module with notification system
notificationReceived: function(notification, payload) {
if(notification === "BUTTON_PRESSED"){
if (isplaying === false){
isplaying = true;
payload = [streamurl,'PLAY'];
this.sendNotification("SHOW_ALERT", {message: "Stream wird gestartet...", timer: 4000}); // ALERT: added by fnsign for better UX
} else {
//Stop omx senden
isplaying = false;
payload = [streamurl,'STOP'];
this.sendNotification("SHOW_ALERT", {type: "notification", message: "Stream wurde beendet."}); // NOTIFICATION: added by fnsign for better UX
}
this.sendSocketNotification('BUTTON_PRESSED', payload);
}
},
Metadata
Metadata
Assignees
Labels
No labels