• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Help with Pages...

Scheduled Pinned Locked Moved Unsolved Troubleshooting
7 Posts 2 Posters 1.6k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    sdetweil @justjim1220
    last edited by sdetweil May 3, 2019, 5:27 PM May 3, 2019, 5:23 PM

    @justjim1220 I think u will need to add code to handle the hide/show.

    I think if I remember correctly, there is a player setting for allowing background play(or not)

    Sam

    How to add modules

    learning how to use browser developers window for css changes

    J 1 Reply Last reply May 3, 2019, 5:34 PM Reply Quote 0
    • S Offline
      sdetweil
      last edited by May 3, 2019, 5:31 PM

      I think the Spotify module just shows what is playing elsewhere, not on the mirror itself

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      1 Reply Last reply Reply Quote 0
      • J Offline
        justjim1220 Module Developer @sdetweil
        last edited by May 3, 2019, 5:34 PM

        @sdetweil that’s what I am having the problem with. I use MMM-pages, it doesn’t really use a css file except to give the module position. so I have no idea how to set it up this way.

        Here’s another example:
        On page 1 I have MMM-Spotify
        Page 2 I have MMM-SoundMachine
        And page 3 I have MMM-MyVideoPlayer

        I would have the page swap set to say 3 hours, meaning it will change to the next page after 3 hours, So, if on page 1, MMM-Spotify is active and playing, then the modules on pages 2 & 3 are inactive (not playing). And, when the 3 hours is up and the page changes to page 2, then Spotify would become inactive, SoundMachine would become active, and the video player would remain inactive until the page changes to page 3.

        I hope this makes sense, I am not sure where in the configurations of the modules or in custom css or what to place code to make this happen, NOR, do I have any idea how to write the code for something like this.

        "Life's Too Short To Dance With Ugly People"
        Jim Hallock - 1995

        S 1 Reply Last reply May 3, 2019, 5:41 PM Reply Quote 0
        • S Offline
          sdetweil @justjim1220
          last edited by May 3, 2019, 5:41 PM

          @justjim1220 each module would have to handle the hide(suspend)/show(resume) effect on themselves. Pages uses hide/show which turns into the suspend/resume calls

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          J 1 Reply Last reply May 3, 2019, 10:28 PM Reply Quote 0
          • J Offline
            justjim1220 Module Developer @sdetweil
            last edited by May 3, 2019, 10:28 PM

            @sdetweil

            looking through dev tools on this, I see when a page turns, whether by click or by timer, it will list all the modules from the current page and suspend them, then it lists all the modules for the second page and resumes them. And it looks as if it is done via notification.

            Is it possible to use the dev tools notification as a trigger to show/hide, suspend/resume, or disable/enable?

            @sdetweil said in Help with Pages...:

            @justjim1220 each module would have to handle the hide(suspend)/show(resume) effect on themselves. Pages uses hide/show which turns into the suspend/resume calls

            so, what I am getting from this statement, this can be done through the pages module???

            "Life's Too Short To Dance With Ugly People"
            Jim Hallock - 1995

            S 1 Reply Last reply May 3, 2019, 11:56 PM Reply Quote 0
            • S Offline
              sdetweil @justjim1220
              last edited by May 3, 2019, 11:56 PM

              @justjim1220 no… each module has to add code to deal with it…

              like your video player… add a suspend() routine to be called when hidden and a config option for backgroundPlay true/false

              and if playing on suspend, and you’re supposed to stop, then stop playing…
              and if resumed and were playing then resume playing, (if u can)…

              but other modules will have to add code like that too… you cannot MAKE them behave

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              1 / 1
              • First post
                6/7
                Last post
              Enjoying MagicMirror? Please consider a donation!
              MagicMirror created by Michael Teeuw.
              Forum managed by Sam, technical setup by Karsten.
              This forum is using NodeBB as its core | Contributors
              Contact | Privacy Policy