--autoplay-policy, no-user-gesture-required flags to allow video and audio to play without user input

This commit is contained in:
P.J.Shand
2018-11-12 17:47:58 +11:00
committed by Joshua Granick
parent 734ed288ab
commit 5bbfd42f59

View File

@@ -46,6 +46,10 @@ class ElectronSetup {
if (height == 0) height = 600;
var frame:Bool = window.borderless == false;
var commandLine = Reflect.getProperty(electron.main.App, "commandLine");
var appendSwitch:haxe.Constraints.Function = Reflect.getProperty(commandLine, "appendSwitch");
appendSwitch('--autoplay-policy','no-user-gesture-required');
electron.main.App.on( 'ready', function(e) {
var config:Dynamic = {
fullscreen: window.fullscreen,