MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    UNSOLVED Hidden modules still playing in the background

    Troubleshooting
    2
    4
    391
    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.
    • R
      ronafios last edited by ronafios

      I want to have a live stream play automatically on YouTube for a couple of hours in the morning. I have everything looking right by using MMM-ModuleScheduler and MMM-EmbedYoutube. The problem is that the stream keeps playing in the background even when not displaying (i.e. it’s simply hidden by the scheduler). Anyone have any ideas how to pause or stop modules, or even swap config.js files based on the time of day?

      S 1 Reply Last reply Reply Quote 0
      • S
        sdetweil @ronafios last edited by

        @ronafios you will have to change the MMM-EmbedYoutube module to stop playing on suspend(), and maybe resume on resume()

        Sam

        Create a working config
        How to add modules

        1 Reply Last reply Reply Quote 0
        • R
          ronafios last edited by

          Sounds right - any thoughts how?

          S 1 Reply Last reply Reply Quote 0
          • S
            sdetweil @ronafios last edited by

            @ronafios edit the file MMM-EmbedYoutube.js, add routine for

            suspend: function(){
              // add specifics here
            },
            resume: function(){
              // add specifics here
            }
            

            I don’t know how the module works… so, you will have to learn that to update…

            if u fork the original repo, then clone that, you will be able to push your changes back to github and submit a pull request back to the MMM-EmbedYoutube author to enable this capability for others

            Sam

            Create a working config
            How to add modules

            1 Reply Last reply Reply Quote 0
            • 1 / 1
            • First post
              Last post
            Enjoying MagicMirror? Please consider a donation!
            MagicMirror created by Michael Teeuw.
            Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
            This forum is using NodeBB as its core | Contributors
            Contact | Privacy Policy