Read the statement by Michael Teeuw here.
No autoplay for videos in v2.14 & v2.15
-
@rudibarani said in No autoplay for videos in v2.14 & v2.15:
Adding this line to electron.js did not have a positive effect as well:
this line is already present in electron .js
function createWindow() { app.commandLine.appendSwitch("autoplay-policy", "no-user-gesture-required");
I put it there… for 2.10
but according to electron page, they moved support from command line to web preferences
https://www.electronjs.org/docs/api/browser-window
so change electron.js like thisfunction createWindow() { let electronOptionsDefaults = { width: 800, height: 600, x: 0, y: 0, darkTheme: true, webPreferences: { contextIsolation: true, nodeIntegration: false, zoomFactor: config.zoom, autoplayPolicy: "no-user-gesture-required" // < --- moved to here }, backgroundColor: "#000000" }
-
@sdetweil said in No autoplay for videos in v2.14 & v2.15:
so change electron.js like this
function createWindow() {
let electronOptionsDefaults = {
width: 800,
height: 600,
x: 0,
y: 0,
darkTheme: true,
webPreferences: {
contextIsolation: true,
nodeIntegration: false,
zoomFactor: config.zoom,
autoplayPolicy: “no-user-gesture-required” // < — moved to here
},
backgroundColor: “#000000”
}Thank your for the suggestion, Sam. I tried it - but unfortunately without success. Autoplay of the ISS Livestream not starting with any of the modules. It works fine, when I go back to v2.13, though.
http://www.ustream.tv/embed/17074538?html5ui&initial-quality=high&volume=0&autoplay=1
Any additional thoughts would be much appreciated!
-
@rudibarani well, we moved from electron 8 to 11, but only on 2.15
-
@sdetweil said in No autoplay for videos in v2.14 & v2.15:
@rudibarani well, we moved from electron 8 to 11
I do to keep up with the latest version of electron via
npm install electron@latest
as I otherwise get a message saying something like “your browser is outdated” hovering above the ISS stream. The current electron version does autoplay with MagicMirror v2.13 - but not with a newer version of MagicMirror.
-
@rudibarani comment out
contextIsolation: true,
better yet, set it to false
in the web preferences
but that doesn’t explain 2.14
-
@sdetweil Thanks for the idea. This does not seem to cause the problem. Autoplay still refuses to cooperate…
-
@rudibarani if you wave the mouse over the mm screen does it work then?
-
@sdetweil No - I need to click on the “play” button on the stream.