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.

    MMM-EARTH-Live & MMM-ISS-Live

    Scheduled Pinned Locked Moved Education
    47 Posts 13 Posters 21.4k Views 14 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.
    • R Offline
      ruskythegreat
      last edited by

      Can anyone help please, I can’t get the feed to autoplay with Electron 15.3.0 even after adding the following
      app.commandLine.appendSwitch(‘autoplay-policy’, ‘no-user-gesture-required’);
      This is how the line looks in electron.js

      function createWindow() {
      app.commandLine.appendSwitch(‘autoplay-policy’, ‘no-user-gesture-required’);
      let electronSwitchesDefaults = [“autoplay-policy”, “no-user-gesture-required”];
      app.commandLine.appendSwitch(…new Set(electronSwitchesDefaults, config.electronSwitches));
      let electronOptionsDefaults = {

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

        @ruskythegreat autoplay is now part of the webPreferences config

        https://www.electronjs.org/docs/latest/api/browser-window

        but, I have heard others say this setting also doesn’t work

        (I did the change request to set it as it is now)

        also, your electron should be 13.5.1 (on MM version 2.17.1)

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        R 1 Reply Last reply Reply Quote 0
        • R Offline
          ruskythegreat @sdetweil
          last edited by

          @sdetweil I did run npm install electron@latest but yes, I am running MM 2.17.1

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

            @ruskythegreat we haven’t tested above 13.5.1

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            R 1 Reply Last reply Reply Quote 0
            • R Offline
              ruskythegreat @sdetweil
              last edited by

              @sdetweil I just downgraded to 13.5.1 but still no auto play.

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

                @ruskythegreat i understand… did u try to change the code to the new webPreferences object parm?

                in general they are stopping autoplay because customers are screaming at them (I hate it too in general purpose use)…

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                R 1 Reply Last reply Reply Quote 0
                • R Offline
                  ruskythegreat @sdetweil
                  last edited by

                  @sdetweil No, Sorry, I’m not familiar with the webPreferences object param Can I trouble you to ELI5 :)

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

                    @ruskythegreat there is already a WebPreferences object in the electron.js file, just down a few lines from your change.
                    line 30

                    look at the doc link for autoplay, to get the right syntax/spelling

                    and add the key and value to the WebPreferences object

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    R 1 Reply Last reply Reply Quote 0
                    • R Offline
                      ruskythegreat @sdetweil
                      last edited by ruskythegreat

                      @sdetweil Thanks for all your help with this.
                      It’s still not autoplaying :(
                      I tried with the autoplayPolicy with the no-user-gesture-required so: -
                      autoplayPolicy: no-user-gesture-required,

                      C&P to eliminate typos!

                      So now the whole webpreferences entry reads: -

                                  webPreferences: {
                                          autoplayPolicy: no-user-gesture-required,
                                          contextIsolation: true,
                                          nodeIntegration: false,
                                          zoomFactor: config.zoom
                                  },
                      

                      But MM doesn’t start!

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

                        @ruskythegreat that string needs quotes

                        in JavaScript

                        the thing to the left of : does not need quotes
                        if the thing to the right is a number or true/false
                        no quotes
                        if the thing to the right is a symbol { or [ no quotes
                        otherwise
                        if it contains letters, it needs quotes.

                        single or double does matter as long as they are the same on both ends

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

                        R 1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 4
                        • 5
                        • 1 / 5
                        • First post
                          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