diff --git a/app/src/common/shared/org/mozilla/vrbrowser/browser/SessionStore.java b/app/src/common/shared/org/mozilla/vrbrowser/browser/SessionStore.java index c76e45902..afbec03ce 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/browser/SessionStore.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/browser/SessionStore.java @@ -737,6 +737,12 @@ private void vrPrefsWorkAround(Context aContext, Bundle aExtras) { } addOptionalPref(out, "dom.vr.require-gesture", aExtras); addOptionalPref(out, "privacy.reduceTimerPrecision", aExtras); + if (aExtras != null && aExtras.getBoolean("media.autoplay.enabled", false)) { + // Enable playing audios without gesture (used for gfx automated testing) + out.write("pref(\"media.autoplay.enabled.user-gestures-needed\", false);\n".getBytes()); + out.write("pref(\"media.autoplay.enabled.ask-permission\", false);\n".getBytes()); + out.write("pref(\"media.autoplay.default\", 0);\n".getBytes()); + } } catch (FileNotFoundException e) { Log.e(LOGTAG, "Unable to create file: '" + prefFileName + "' got exception: " + e.toString()); } catch (IOException e) {