Git Product home page Git Product logo

Comments (4)

Snille avatar Snille commented on August 13, 2024

Hmm... No, not really, with the "gotourl" you will load another page instead of the mirror in the same webbrowser-window... But, maybe you could use the "showurl" and "hideurl"-button function...

In the button array, add a button that shows or hides (any) module. (for example, a "picture module" or any other then just use a picture of just 1 black pixel :))... And use the "showurl" and "hideurl" arguments in the button to trigger something... That should work... :) Don't know if it achieves what you want...

The button:

    },
    "1": {
      // A button to show and hide the clock in this example, and is uses the "bell" icon.
      module: "clock",
      idnum: 1,
      text: "Clock",
      symbol: "bell",
      symbol2: "bell-slash",
      showUrl: "http://10.227.10.56:9000/material/?page=now-playing",
      hideUrl: "http://10.227.10.56:9000/material/?page=stop-playing"
    },

from mmm-modulebar.

mmycjguo avatar mmycjguo commented on August 13, 2024

Thank you very, very much for your quick reply, I just want to show this
module: "MMM-SmartWebDisplay",
//idnum: 1,
symbol: "fas fa-laptop-house",
symbol2: "fas fa-home",
showUrl: 'http://10.227.10.70:8080/remote?action=NOTIFICATION&notification=SWD_URL&payload={"url":["http://10.227.10.56:9000/material/?page=now-playing"], "update":"0", "NextURL":"0"}',
hideUrl: 'http://10.227.10.70:8080/remote?action=NOTIFICATION&notification=SWD_URL&payload={"url":[""], "update":"0", "NextURL":"0"}'

from mmm-modulebar.

mmycjguo avatar mmycjguo commented on August 13, 2024

if I want to use gotourl to load page 2,Is this the configuration parameter?
"1": {
module: "MMM-SmartWebDisplay",
//idnum: 1,
symbol: "fas fa-laptop-house",
symbol2: "fas fa-home",
showUrl: 'http://10.227.10.70:8080/remote?action=NOTIFICATION&notification=SWD_URL&payload={"url":["https://home.mygogo.win:8123/lovelace-magicmirror/0"], "update":"0", "NextURL":"0"}',
hideUrl: 'http://10.227.10.70:8080/remote?action=NOTIFICATION&notification=SWD_URL&payload={"url":[""], "update":"0", "NextURL":"0"}'
gotoUrl: 2
},

from mmm-modulebar.

Snille avatar Snille commented on August 13, 2024

I'm not sure I understand what you want to do... The "gotourl" can not be used in the same button as the "showurl" and "hideurl", at least have I not tried it that way. :) The "gotourl" needs to have the full URL defined. The "gotourl" will navigate away from the mirror it self and will load the page you have defined.

The "showurl" and "hideurl" will be visited in the "background", it will not show anywhere. I made that function to be able to "start" and "stop" a stream for MotionEye. So when the camera is "displayed" (by pressing the button) the "showurl" triggers MotionEye to start the stream for the camera. And when the camera is hidden again, the "hideurl" triggers MotionEye to stop the stream. Otherwise the hidden camera would stream all the time and a lot of bandwidth would be waisted. :)

However I don't know if this helps you. :) But that was the thinking behind the functions... :)

from mmm-modulebar.

Related Issues (12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.