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

Commit

Permalink
Add optional audio gesture intent paramenter (#996)
Browse files Browse the repository at this point in the history
* Add optional audio gesture intent paramenter

* Handle more autoplay permissions on intent
  • Loading branch information
MortimerGoro authored Mar 18, 2019
1 parent c4069c8 commit bfb803d
Showing 1 changed file with 6 additions and 0 deletions.
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

0 comments on commit bfb803d

Please sign in to comment.