Skip to content
This repository has been archived by the owner on Jul 22, 2024. It is now read-only.

Add optional audio gesture intent paramenter #996

Merged
merged 2 commits into from
Mar 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down