Note: When I run the project in ./serveronly mode and run magic mirror in chrome, the camera works just fine. I guess I need to figure out a way to enable the webcam for electron.
Read the statement by Michael Teeuw here.
Latest posts made by jason02
-
RE: Alexyak Camera module displaying orange screen
-
Alexyak Camera module displaying orange screen
Hi,
For demonstration purposes, I would like to run magic mirror on pc. I would like to use the webcam that is integrated in the pc(instead of the seperate USB camera).
Whenever I enable the video feed, an orange screen is displayed. I believe this has something to do with an access error for the camera? Any idea of how I can get this to work with the integrated camera with my laptop?
-
RE: Need help sending a notification after a click event
Thanks for your input, I modified it a bit to get the result I wanted! Works like a charm!
getDom: function() { var wrapper = document.createElement("div"); var button = document.createElement("div"); var text = document.createElement("span"); var hidden = true; button.className = "hide-toggle"; text.innerHTML = this.config.caption; text.addEventListener("click", () => this.sendNotification("BUTTON_PRESSED", {})); button.appendChild(text); wrapper.appendChild(button); return wrapper; }
-
RE: Need help sending a notification after a click event
Actually this isn’t a button connected to the gpio of the raspberry. This is literally a button displayed on the screen of the raspberry pi
-
Need help sending a notification after a click event
Hi All,
I have a button on my magic mirror. When I click the button, I want it to send a notification to another module so that it can perform an action.
Here’s a snippet of what I have so far, sorry if i’m way off, not really great at javascript :S
getDom: function() { var wrapper = document.createElement("div"); var button = document.createElement("div"); var text = document.createElement("span"); text.innerHTML = 'click me'; button.appendChild(text); wrapper.appendChild(button); $(button).on("click", function(){ this.sendNotification("BUTTON_PRESSED", {}); }); return wrapper; } });
When I execute this code, I get an error, ‘this.sendNotification is not a function’. So obviously I’m trying to call that function when it is not in scope. But I don’t really know of another way to wire up the button click to the send notification function. Any ideas anyone?
Thanks!
-
Possible to enable mouse cursor on screen?
Hi, I’m planning to create a module to display a image carousel. The will be a left button on the left side of the screen and a right button on the right side of the screen. When a user clicks the left or right button, a new image is displayed in the center of the screen.
The final version will most likely be touch enabled, but until then I would like to test out the button click events using a mouse for the time being. However the mouse/cursor seems disabled whenever I load the magic mirror. Is there anyway I can enable the mouse while using the magic mirror?